Repository navigation
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 5, 2026, 1:35 PM ET / 17:35 UTC. ClawSweeper reviewWhat this changesThis PR replaces the hidden current-turn runtime-context header with position-independent instructions and extends transcript-sanitizer coverage for current, legacy, and event headers. Merge readiness⛔ Blocked until stronger real behavior proof is added - 4 items remain No concrete patch defect was found, and current main still uses the misleading relative header. Keep this PR open for a final-head provider trace and the required direct Codex-source contract check before merge. Priority: P1 Review scores
Verification
How this fits togetherThe embedded agent runner sends hidden runtime context alongside the visible user request before model calls. Continuations can move that hidden carrier to the tail, and transcript sanitization later removes it from user-visible text. flowchart LR
A[Inbound user request] --> B[Runtime context builder]
B --> C[Hidden context carrier]
A --> D[Visible user message]
C --> E[Model continuation]
D --> E
E --> F[User-visible transcript sanitizer]
Decision needed
Why: The exact header wording was consolidated after the live run, and repository policy requires direct Codex source inspection before a Codex-related proof or merge verdict. Before merge
Agent review detailsSecurityNone. PR surfaceSource -1, Tests +34. Total +33 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the carrier ordering unchanged, obtain a redacted final-head provider trace for the affected continuation, and verify the Codex contract from a workspace with the required sibling source before landing this canonical fix. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main retains the old header and the supplied authenticated LM Studio trace shows the affected continuation ending in Is this the best way to solve the issue? Yes for code shape: changing the canonical header owner while preserving carrier placement, provider routing, cache behavior, and sanitizer compatibility is narrower than moving or duplicating the carrier; final-head proof remains needed. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 412a1a316743. LabelsLabel changes:
Label 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 (11 earlier review cycles; latest 8 shown)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
ac8cc62 to
57d373e
Compare
Keep current-turn runtime context position-independent while preserving the shared privacy notice, runtime events, prompt-cache placement, and historical preface sanitization. Consolidate header detection in its existing owner and retain the original real turn-boundary regression. Fixes openclaw#110672 Co-authored-by: chernoff-code <[email protected]>
|
@clawsweeper re-review Please review exact head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Maintainer proof for exact head The original contributor's earlier authenticated Docker/LM Studio before→after run changed a silent |
|
Merged via squash.
|
…cope * origin/main: (70 commits) fix(clickclack): preserve MIME extension for unnamed uploads (openclaw#119646) fix(memory): keep post-ready RPCs responsive (openclaw#119710) fix(browser): preserve locale, timezone, and device overrides (openclaw#119695) fix(agents): stop messaging dedupe from dropping final replies that quote a short tool send (openclaw#118178) test(agents): batch code mode budget proof (openclaw#119699) fix(memory): keep gateway RPCs responsive during startup (openclaw#119676) improve(ui): trail transient session status beside row actions (openclaw#119560) refactor(msteams): consolidate channel action target resolution (openclaw#119632) fix: tail context answers the current user message (openclaw#117364) fix(whatsapp): exercise descriptor-safe credential persistence (openclaw#119621) fix(diagnostics-otel): route OTLP endpoints by signal (openclaw#101655) refactor(skills): consolidate workshop transcript and record normalization (openclaw#119643) fix(video): harden DashScope task and media lifecycle (openclaw#117303) refactor(transcripts): consolidate persistence and export ownership (openclaw#119634) fix: preserve ClickClack discussion state contracts (openclaw#118851) fix(matrix): retire shared E2EE clients safely (openclaw#119570) refactor(cron): unify catch-up persistence and payload encoding (openclaw#119636) refactor(ui): centralize composer attachment and capability controls (openclaw#119650) refactor(daemon): consolidate managed service lifecycle ownership (openclaw#119647) fix(browser): honor explicit navigation timeouts across browser drivers (openclaw#119654) ...
* fix(agents): apply image context to current turn * fix(agents): align runtime context with prompt order * fix(agents): make turn context position independent * fix(agents): bind internal context to the active user turn Keep current-turn runtime context position-independent while preserving the shared privacy notice, runtime events, prompt-cache placement, and historical preface sanitization. Consolidate header detection in its existing owner and retain the original real turn-boundary regression. Fixes openclaw#110672 Co-authored-by: chernoff-code <[email protected]> --------- Co-authored-by: chernoff-code <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Fixes an issue where users sending an image with a question can receive no final answer from local reasoning models even though the image was successfully analyzed by the configured vision model.
Runtime context is carried across multiple model calls in one user turn. A relative instruction such as ^\preceding message^] or ^\message that follows^] becomes incorrect when tool execution changes where the carrier appears, causing local models to wait or emit
NO_REPLY.Why This Change Was Made
Only the existing
src/agents/internal-runtime-context.tsowner changes production behavior. Its current-turn header now keeps the contributor's live-proven, position-independent instruction together:The existing shared
This context is runtime-generated, not user-authored. Keep internal details private.notice remains byte-for-byte unchanged for current turns, runtime events, and BOOT prompts. One typed header collection recognizes the current header, the previously shipped header, and the unchanged runtime-event header for both detection and stripping; historical persisted transcripts therefore remain clean without adding a second policy or speculative compatibility notice.The original real runtime-context carrier boundary regression remains intact. No production producer, carrier placement, prompt-cache breakpoint, attachment hydration, provider routing, runtime-event semantics, or model selection changes.
User Impact
Local multimodal and reasoning models can answer an image question in the same turn instead of exposing hidden reasoning, waiting for another message, or returning no visible answer.
Evidence
Original contributor authenticated live LM Studio proof
The original contributor performed this Docker/LM Studio run on the earlier semantically equivalent instruction layout. The consolidated current head embeds that exact successful continuation instruction while restoring the existing shared privacy notice. No additional live provider call was performed for the owner-only consolidation.
Environment:
lmstudio/openai/gpt-oss-20blmstudio/google/gemma-4-e4bchat.sendturn with delivery disabledWhat is shown in this image? Answer in one sentence.Before the position-independent wording, the redacted trajectory ended with:
{ "assistantTexts": ["NO_REPLY"], "status": "success", "timedOut": false }The trace showed why relative wording is unsafe: the carrier preceded the active prompt on the initial call but was replayed after a tool result on the continuation call.
After the contributor's original semantically equivalent repair:
{ "provider": "lmstudio", "model": "openai/gpt-oss-20b", "status": "success", "assistantTexts": [ "This is a close-up portrait of a young woman with long, dark hair looking directly at the camera." ], "finalPromptHasQuestion": true, "timedOut": false }Gateway logs also confirmed a successful
200call togoogle/gemma-4-e4bbefore the gpt-oss response. Sandbox was temporarily disabled only for this non-delivered proof because the local Docker-outside-Docker bind maps the container state path as a host path; it was restored toallimmediately afterward and Gateway health returned200.Automated and maintainer proof
core-runtime-tui-ptyshard executed zero tests and timed out twice.main.codex-rs/context-fragments/src/fragment.rs:46,codex-rs/protocol/src/user_input.rs:15,codex-rs/core/src/tools/context.rs:96).src/agents/internal-runtime-context.ts+11/-12 (net -1). Focused tests: three files +43/-9. Total PR scope: four files.oxfmt --check; fresh exact-head hosted CI and ClawSweeper review are requested for the final signed head.Related: #84812 fixes current-turn image attachment hydration; this PR addresses the later prompt-semantics boundary after the attachment has already been hydrated.
Closes #110672