Files
openclaw/docs
Chris Eckert 1d5bf19df4 improve(diagnostics): surface run startup phases as session-correlated events (#107984)
* improve(diagnostics): surface run startup phases as session-correlated events

The embedded runner reports ordered startup milestones (workspace, auth,
context_engine, ..., model_call_started) through the private
onExecutionPhase callback, so they reach typing indicators and cron
watchdogs but never the diagnostic bus. External status surfaces that
already consume run.attempt / run.progress / model.call.* cannot see
where a turn is during startup — exactly the window that matters when a
run hangs before its first model call.

Wrap params.onExecutionPhase once at the runner entry so every phase
transition also emits a session-correlated run.execution_phase event
(runId, sessionId, sessionKey, closed EmbeddedAgentExecutionPhase +
provider/model/tool context). The event rides the async diagnostic lane
like the other high-frequency lifecycle events, so ordering against
model.call.* is preserved and no subscriber work runs on the hot path.
The wrapper tracks session rotation via onSessionIdChanged so
post-compaction phases carry the current session id. Stability records
project the milestone into their dedicated phase/provider/model fields.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(diagnostics): preserve trusted phase observability

* chore(plugin-sdk): refresh diagnostic API baseline

* fix(diagnostics): publish execution phases to plugins

* refactor(logging): keep public diagnostic recorder path

* fix(plugin-sdk): keep deprecated budget exact

* fix(plugin-sdk): refresh diagnostic surface budget

* fix(diagnostics): preserve execution phase coverage

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-18 07:46:26 +01:00
..