Repository navigation
fix(agents): keep private yield continuation out of the tool result - #139254
Colton-Harris wants to merge 2 commits into
Conversation
Preserve continuation context through the existing callback without repeating it in the public tool result. Co-Authored-By: Codex <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. Reviewed September 5, 2026, 2:11 PM ET / 18:11 UTC. ClawSweeper reviewWhat this changesThe PR removes private continuation text from the yield tool’s public result and updates tests while preserving the continuation callback and public waiting acknowledgment. Merge readiness⛔ Blocked before merge - 2 items remain This remains a useful fix for a privacy leak present on current main and v2026.9.1. No blocking patch defects were found; the previous requirement for real channel-behavior proof remains unmet. Priority: P2 Review scores
Verification
How this fits togetherThe yield tool pauses an agent while background children finish. Its callback carries continuation context, while its result can appear in chat when full tool verbosity is enabled. flowchart TD
A[Agent requests a pause] --> B[Yield tool]
B --> C{Pending child completion owned?}
C -->|No| D[Actionable error]
C -->|Yes| E[Private continuation callback]
E --> F[Pause and resume lifecycle]
E --> G[Public status and acknowledgment]
G --> H[Verbose chat output]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -1, Tests +21. Total +20 across 5 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep private continuation context on the existing callback path and return only public yield status and acknowledgment, backed by changed-path channel evidence. Do we have a high-confidence way to reproduce the issue? Yes, from source: an accepted yield with private message text serializes that text into the result, which full verbosity forwards to chat. This read-only review did not execute the reproduction. Is this the best way to solve the issue? Yes. Removing the duplicate field at its producer preserves the callback contract; channel filters or disabling verbosity would leave other result consumers exposed. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f8d63c5dc08a. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Two consumer suites pinned the old sessions_yield result shape and failed CI after the private message field was removed. Both keep their real assertions: the runtime test still proves the abort wrapper preserves a successful yield, and the gateway test still proves onYield receives the private message. The result-shape expectations now also assert the private field is absent.
|
Thanks @Colton-Harris. Your producer fix is preserved and credited in the merged replacement #139801 ( Real Telegram Test Server and native child/yield/resume proof verified private-output exclusion, hidden continuation, public acknowledgment, and preserved original private input records. Independent acceptance and the final local review passed. The replacement's landing comment records the single proven unrelated CI failure and guarded exception. Closing this PR as superseded by the verified landed repair. |
Related: #25592 (intermediate processing output appearing in messaging channels).
Follow-up to #125106 (separate private resume context from the public waiting acknowledgment).
What Problem This Solves
Fixes an issue where users waiting for background work could see private continuation context in their chat when full tool verbosity was enabled. The yield tool describes
messageas private, but its raw success result repeated that text.Why This Change Was Made
Keep the private message solely on the existing
onYieldcontinuation path; omit it from the tool-visible JSON result at the producer. The publicacknowledgmentandstatus: "yielded"remain unchanged, so pause detection, waiting replies, and continuation behavior retain their existing contracts. No channel-specific filtering or verbosity configuration changes are needed.This closes the raw-result path left after the tool-summary privacy change in #125106. It does not attempt to resolve all intermediate narration covered by #25592.
User Impact
Full verbosity can still show useful tool status and the explicitly public waiting acknowledgment without also forwarding the private resume message. Existing internal continuation context remains available.
Evidence
SYNTHETIC_PRIVATE_CONTINUATION_MARKERthrough full-verbosity output; off/on controls passed. The producer tests also failed because the marker was included in both JSON content and result details.src/agents/tools/sessions-yield-tool.ts; JSON envelope owner:src/agents/tools/tool-results.ts. The embedded runtime storesyieldMessageindependently inattempt.ts; the Codex callback carries context independently indynamic-tool-build.ts. Both consume the preserved status/callback, not the removed echo.openai/codex@459a79eb85400af759e9220c7bafb4429ae07516:codex-rs/core/src/tools/handlers/dynamic.rs:153-164,219-233andcodex-rs/app-server/src/dynamic_tools.rs:37-53forward returned content to model output and completed tool notifications. This is why the result producer is the correct boundary.node scripts/check-changed.mjs -- src/agents/tools/sessions-yield-tool.ts src/agents/tools/sessions-yield-tool.test.ts src/agents/embedded-agent-subscribe.handlers.tools.test.ts: passed, including formatting, core/core-test typechecks, targeted lint, import/schema guards, and security guards.No private transcripts, real continuation text, credentials, or live configuration are included.