Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 976536a381
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex re-review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1a99832eff
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex re-review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e9dc340af1
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| */ | ||
| outputTruncatedIncomplete = false; | ||
| /** One automatic context-stop continuation per agent per run bounds billable retries. */ | ||
| private contextStopContinued = new Map<string, string>(); |
There was a problem hiding this comment.
Persist context-stop provenance across durable resumes
When the continuation produces an approval-gated tool call and the host recreates Run before resuming its checkpoint, this in-memory map is empty because it is absent from RunStepResumeState. The post-tool assistant message therefore loses contextStopContinuationOf, causing the Langfuse root output to omit the pre-interrupt segments; another context-window stop can also receive a second billable retry despite the one-per-run contract. Persist and restore this map with the other process-safe resume state.
AGENTS.md reference: AGENTS.md:L144-L144
Useful? React with 👍 / 👎.
| !this.contextStopContinued.has(agentId) && | ||
| !this.preemptIncomplete && |
There was a problem hiding this comment.
Scope the preemption guard to the current agent
In a parallel MultiAgentGraph, if one agent first seals without a boundary injection, it sets the graph-wide preemptIncomplete flag; a different agent that then returns model_context_window_exceeded fails this condition and never receives its continuation. The result depends on branch completion order, so this guard should check whether the current response/agent was preempted rather than the shared aggregate flag.
Useful? React with 👍 / 👎.
Summary
Resume once per agent/run after Anthropic's
model_context_window_exceededstop, preserving partial output and encrypted server-search results. Keep the raw streaming stop reason; pending client tools retain their normal route. A repeated stop sets the existingoutput_truncatedhalt reason.Claude Code behavior
Local Claude Code 2.1.268 tests showed top-level context stops trigger a resume request with unchanged history, not compaction. Its nested WebSearch path instead returns links to the outer model. This follows the top-level continuation pattern, with a one-continuation safety bound and search history retained.
Validation
The Bedrock continuation used a full-capacity model context: this verifies replay, not compaction of a still-full window. The tested LibreChat build does not yet map
output_truncatedto its persistedunfinishedflag.