You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several open issues in docker-agent address the same underlying need: being able to observe, measure and introspect what the agent does at runtime — token usage, LLM call costs, tool call stats, and lifecycle hook ordering. They were filed independently with no shared label and no common design connecting them.
This epic is the single reference to group them and drive a coherent solution.
Open issues in scope
Token usage & cost in hooks
Expose per-turn token usage and cost in the after_llm_call hook payload #2948 — Expose per-turn token usage and cost in the after_llm_call hook payload
The hook fires after every LLM call but does not include how many tokens were consumed or what it cost, making it impossible to build cost-aware tooling on top of the hook system.
Several open issues in docker-agent address the same underlying need: being able to observe, measure and introspect what the agent does at runtime — token usage, LLM call costs, tool call stats, and lifecycle hook ordering. They were filed independently with no shared label and no common design connecting them.
This epic is the single reference to group them and drive a coherent solution.
Open issues in scope
Token usage & cost in hooks
after_llm_callhook payloadThe hook fires after every LLM call but does not include how many tokens were consumed or what it cost, making it impossible to build cost-aware tooling on top of the hook system.
Hook lifecycle & ordering
StreamStoppedordering vs session-end hooks and document teardown trade-offsIt is currently undefined whether
StreamStoppedfires before or after session-end hooks, making telemetry and cleanup logic unreliable.Run statistics & performance metrics
There is no structured summary of what happened during a run (tool call count, success/failure rate, wall-clock duration, etc.).
Tool call visibility & latency
When an MCP tool call takes a long time or blocks on an external system, docker-agent gives no feedback on duration or status.
Implementation order
after_llm_callhook payload — addinput_tokens,output_tokens,reasoning_tokens,cost_usd; small, self-contained, immediately useful for external tooling.RunSummarystructure — aggregate tokens, cost, tool call count, success/failure count, wall-clock duration into a structured end-of-session summary; builds on all three previous steps.