Repository navigation
Conversation
Literal none snapshots for idle process/subagent/media/exec facts made buildRuntimeContextCustomMessage attach on every turn, which pins local prefix caches at the system prompt. Keep none only when append-only runtime context needs an explicit empty supersede. Fixes openclaw#150286
|
🦞👀 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: blocked before merge. What this changesThe PR omits empty background-work and executable-approval facts from model requests, while retaining explicit empty snapshots when earlier facts remain in conversation history. Example: A user continues a conversation with process and subagent tools available but idle.
Review scores
ProductKind: Bug fix · Worth it: No · Fix scope: Complete Merge readiness⛔ Blocked before merge - 3 items remain Current main already contains the useful change, but this PR has an assigned reviewer and therefore falls under the maintainer-engaged keep-open policy. The previous closure proposal overlooked that guard. Priority: P2 Decision needed
Before merge
Findings
Tests
Agent review detailsHow this fits togetherOpenClaw assembles current background-work facts alongside each model request. The prompt builder places those facts in a separate context message and decides whether earlier context messages remain in history. flowchart TD
A[Current tool capabilities] --> C[Runtime fact producers]
B[Processes, subagents, media and approvals] --> C
C --> D{Retain earlier context?}
D -->|Yes| E[Include explicit empty snapshots]
D -->|No| F[Omit idle sections]
E --> G[Model request context]
F --> G
Technical reviewBest possible solution: Keep the merged producer-level omission and explicit clearing behavior, with distinct cache-retention work reviewed separately. Do we have a high-confidence way to reproduce the issue? No current-main failure was reproduced: source now omits the reported idle sections. Historical real-engine runs establish the original trigger and an improved after-fix result; this review executed no target code. Is this the best way to solve the issue? Yes, conditional omission at the fact producer is the appropriate repair. The merged implementation also preserves CLI clearing snapshots that this branch misses. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e39552c18106; fix evidence: commit cd9913f1b110, main fix timestamp 2026-10-03T20:09:13Z. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +24, Tests +4. Total +28 across 4 files. Added test files: 0. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 9, 2026, 8:24 PM ET / October 10, 2026, 00:24 UTC. |
|
Hi @Bartok9. The four blockers listed in the ClawSweeper review are addressed on a branch built on top of your commit. Your commit The branch is at https://github.com/Scee-Tech-Studio/openclaw/tree/pr150290-envoi What sits on top of your commit:
Mean of turns 2 to 5: main 0.0% cache reuse at 2.1 s TTFT, the fix 99.7% at 123 ms. The engine Two things worth knowing before a merge: the test scope is targeted (7 files), not the full suite; and for Take any or all of this into #150290, whichever shape suits you. Happy to rework the commit split, the wording or the proof if you want it differently. @fuller-stack-dev, since you are assigned here: the branch works as it stands, pulled into this PR or opened as a separate PR crediting Bartok9, whichever is least work on your side. If main moves before review, we can rebase it again. |
|
Opened #160174 with the branch described above, rebased onto current main. Two more upstream changes were absorbed on the way: #159179 replaced the media task lookup, so the The only red check is @fuller-stack-dev, if landing this through #150290 is simpler for you, the three commits apply as they are and we will close #160174. Thanks |
|
Thanks for this fix and the clear write-up in #150286. The same behavior was fixed on |
Summary
Literal
nonesnapshots for idle process / subagent / media / Windows-exec facts madebuildRuntimeContextCustomMessageattach on every turn. On local engines whose history entry must match exactly, that trailing carrier moves each request and pins prefix reuse at the system prompt.Omit information-free sections unless
appendOnlyRuntimeContextneeds an explicit empty supersede (Anthropic-style append-only).Fixes #150286
Test plan
src/agents/runtime-facts-prompt.test.tssrc/agents/embedded-agent-runner/run/attempt-prompt-context.test.tsvitestCLI failed to start in this worktree (defineCacheKeyGenerator); same as 2026-09-15 nightly.