Model request stops making progress
Use Agent phase logs to distinguish input assembly, model stream waits, and output processing
When a tool appears to remain active, inspect the Agent phase logs. Generating tool arguments through the model stream and executing the tool are separate stages.
Locate the wait
The Session executor records these boundaries:
| Log | Meaning |
|---|---|
[agent] step.input_start | Committing pending input and assembling the step |
[agent] step.input_ready | Input is ready; includes model ID, context window, message count, and tool count |
[agent] model_request.request_start | Starting one model invocation |
[agent] model_request.stream_open | The model client returned an event stream |
[agent] model_request.first_event | First event consumed; this may only be model_start, not generated content |
[agent] model_request.waiting | Current stage and latest event, recorded every 30 seconds while the call remains active |
[agent] model_request.stream_end | Stream closed and protocol validation passed; tools may still be executing |
[agent] model_request.request_failed | Invocation or event handling failed; consult failure logs for the cause |
[agent] step.finish | Model step and its tools finished |
Filter by session_id and turn_id, then use invocation_id to identify each model call. attempt counts attempts within the same step.
In waiting records, stage distinguishes opening (waiting for the model client to return a stream), reading (waiting for the next event), and accepting (processing an event and its output callback). last_event_type, last_event_at, and event_count show whether events are still arriving. Records do not include message bodies or tool arguments.
If input_start has no matching input_ready, inspect pending input commits and context assembly. If stream_end has no subsequent step.finish, inspect tool execution and step finalization.
Check the context window
Inspect context_window in input-ready or model-request records. null means the execution has no valid window size and cannot calculate context pressure. Check the model definition and catalog metadata propagation instead of inferring capacity from the model name.
With a valid window, the current pressure threshold is 95%. A long context without a compaction record does not by itself indicate a compaction failure. These logs provide diagnostics; they do not add request timeouts, retry partial output, or recover active sessions.
Rebuild the runtime and restart its host to enable logs for new calls. Requests already in progress will not receive historical phase records.