fix(run-events): emit canonical past-tense run event types and tool result content - #4495
Conversation
…esult content The runtime now writes the past-tense name for every control plane run event type it produces: - AGENT_RUN_MODEL_CALL_CONTEXT -> AGENT_RUN_MODEL_CALL_CONTEXT_RECORDED - AGENT_RUN_TOOL_EXPOSURE_CHECKPOINT -> AGENT_RUN_TOOL_EXPOSURE_CHECKPOINTED - AGENT_RUN_PROVIDER_REPLAY_CHECKPOINT -> AGENT_RUN_PROVIDER_REPLAY_CHECKPOINTED - AGENT_RUN_PROVIDER_REPLAY_TURN_COMPLETE -> AGENT_RUN_PROVIDER_REPLAY_TURN_FINISHED The `veryfront/run-events` vocabulary lists all eight renamed types under their past-tense names and wire names, and its catalog digests are recomputed. The private-event boundary still recognizes the pre-rename spellings of the model call context and provider replay checkpoint, so an event from an older producer is never treated as public, and normalization rewrites it to the canonical name. The private SSE frame names are unchanged because the API matches them exactly. AG-UI `ToolCallResult` frames now carry the canonical `content` field instead of `result`. The value is passed through unchanged. The internal SSE payload allow-list declares `content`, so it is no longer dropped, and the SSE parser serializes `content` the same way it serialized `result`. Claude-Session: https://claude.ai/code/session_01CqY82FYm9aUkyawWmh4T9n
|
You have reached your Codex usage limits for security reviews. Please try again later. |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Warning Review limit reachedNext included review available in 32 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (39)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughChangesEvent vocabulary and compatibility
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The event and tool-result migrations include compatible reads for the documented legacy paths and targeted coverage for canonical payload handling. No merge-blocking issue is established. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 45.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 38 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📦 Client bundle boundary
A server module in a client graph aborts hydration in the browser. New leaks fail CI; known leaks are tracked in |
Review: 90/100 — clean, thorough past-tense rename with well-scoped backward compatibilitySummary: A mechanical control-plane event rename done carefully, with read-compat added exactly where this codebase actually replays its own persisted private events, and no stray references left behind. Strengths
Minor concerns (non-blocking)
CI was still running several jobs (coverage shards, lint, integration tests) at review time but everything completed so far (typecheck, format, most test suites) was green. Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 02ba7c48ee
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
|
@codex review |
A ToolCallResult frame whose canonical content is null was left as raw null by the SSE parser, and a frame carrying both a null content and a legacy result substituted the legacy value. The parser now uses content whenever the key is present and falls back to result only when it is absent, so a null result still serializes to "null". Claude-Session: https://claude.ai/code/session_01CqY82FYm9aUkyawWmh4T9n
|
@codex review |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
You have reached your Codex usage limits for security reviews. Please try again later. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ea825974fa
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
A tool that returns null now reaches the chat decoder as content: null. The decoder read content ?? result, so a null output with no legacy result became undefined and the tool-output-available event lost the value. The decoder now uses content whenever the key is present and falls back to result only when it is absent. Claude-Session: https://claude.ai/code/session_01CqY82FYm9aUkyawWmh4T9n
|
@codex review |
|
You have reached your Codex usage limits for security reviews. Please try again later. |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 50ca022307
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
The eval adapter read a ToolCallResult's legacy result before its content. A frame carrying only content now reached getToolResultError as a serialized JSON string, so a tool error recorded the raw JSON instead of its message, and a frame carrying both fields recorded the stale legacy output. Both extractors now select content whenever it is present and fall back to result and output only without it. Claude-Session: https://claude.ai/code/session_01CqY82FYm9aUkyawWmh4T9n
|
@codex review |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
You have reached your Codex usage limits for security reviews. Please try again later. |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|



Summary
The runtime now emits the canonical past-tense run event type names, and tool results carry the canonical
contentfield.Run event type names
Every control plane event type this runtime writes uses its past-tense name:
AGENT_RUN_MODEL_CALL_CONTEXTAGENT_RUN_MODEL_CALL_CONTEXT_RECORDEDAGENT_RUN_TOOL_EXPOSURE_CHECKPOINTAGENT_RUN_TOOL_EXPOSURE_CHECKPOINTEDAGENT_RUN_PROVIDER_REPLAY_CHECKPOINTAGENT_RUN_PROVIDER_REPLAY_CHECKPOINTEDAGENT_RUN_PROVIDER_REPLAY_TURN_COMPLETEAGENT_RUN_PROVIDER_REPLAY_TURN_FINISHEDEmission sites:
src/agent/hosted/executor-model-dispatch.ts)src/runtime/runtime-bridge.ts)src/internal-agents/run-stream.ts)src/agent/runtime/tool-exposure.ts,src/agent/runtime/provider-replay.ts), which every checkpoint append usesveryfront/run-events(src/run-events/vocabulary.ts) lists all eight renamed control plane types under their past-tense names and wire names. The catalog digests in its test are recomputed.Read compatibility:
The private SSE frame names (
AgentRunModelCallContext,AgentRunProviderReplayTurnComplete) are intentionally unchanged: the receiving API matches them exactly.Tool result
contentAG-UI
ToolCallResultframes now sendcontentinstead ofresult, from the stream encoder and the lifecycle adapter:resultis stored.content. Before, an undeclaredcontentwas dropped silently.parseAgUiSseResponseserializescontentthe same way it serializedresult, so its output is unchanged.contentfirst.Test plan
contentfield were changed first and failed, then passed after the implementation.deno task test:fileover the agent, conversation, hosted, internal-agents, run-events, runtime and chat areas.deno task typecheck,deno lintanddeno fmt --checkon the changed files,deno task docs:api-reference:check,deno task lint:style,deno task lint:anti-slop.https://claude.ai/code/session_01CqY82FYm9aUkyawWmh4T9n
Summary by CodeRabbit
contentas the canonical payload field.resultfield remain readable for compatibility.