Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 30, 2026, 8:04 AM ET / 12:04 UTC. ClawSweeper reviewWhat this changesMoves exec and background-process retention-loss disclosures before retained command output so the session transcript cap preserves the warning. Regression provenancePossible regression — probable (reviewed change; known regression link). No predecessor PR is attributed. Merge readinessKeep open. Current main still puts the aggregate-loss disclosure after retained output; this branch moves it to the producer boundary across foreground exec and process poll/log paths. No introduced correctness defect was found, but exact-head checks are still in progress. Priority: P1 Review scores
Verification
How this fits togetherExec and process tools create model-visible command results that the session transcript guard later caps before persistence. This change ensures an unrecoverable-output warning reaches later agent turns even when retained output is shortened again. flowchart LR
A[Command child output] --> B[Exec or process result]
B --> C[Aggregate retention cap]
C --> D[Loss disclosure]
D --> E[Session transcript cap]
E --> F[Persisted agent context]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +4, Tests +36. Total +40 across 6 files. 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. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the irreversible-loss fact first at the exec/process producer boundary while retaining the session guard’s generic truncation behavior, then merge after exact-head validation is green. Do we have a high-confidence way to reproduce the issue? Yes. Current main’s producer appends the loss notice after retained output, while the session guard retains the head of oversized tool results; the resulting loss of the notice follows directly from those source paths. Is this the best way to solve the issue? Yes. Front-loading the producer-owned irreversible-loss disclosure is the narrow canonical repair, avoiding special cases in the generic session guard and preserving the separately tracked find/grep work. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a8c8c8270836. 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 (8 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Removed the |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
a1ba007 to
fe2dc35
Compare
|
@clawsweeper re-review P1 (commit message no longer closes the issue), P2 (disclosure front-loaded ahead of unbounded warningText + oversized-warning boundary regressions), and rebase onto latest main (incl. #129273) are all done. New head: fe2dc35afc58a078a89fdb2a692bfa5d03b9e79a |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
CI triage: most
|
| Shard | Job | Failing test |
|---|---|---|
large-11 |
97890039719 |
src/media-understanding/runner.local-no-auth.test.ts:287 — uses OpenAI API key auth for audio when the default OpenAI profile is OAuth — timeout |
large-17 |
97890039848 |
src/auto-reply/reply/commands-learn.test.ts:106 — includes the load-bearing skill authoring standards — assertion |
large-29 |
97890039800 |
src/agents/model-auth.oauth-refresh-fail-closed.test.ts:37 — does not fall back to env after a configured OAuth profile refresh fails — timeout |
large-3 |
97890039807 |
src/agents/embedded-agent-runner/model-resolution-consistency.test.ts:185 — timeout |
large-9 |
97890039780 |
src/agents/runtime-plan/resolve-auth.test.ts:112 — timeout |
small-20 |
97890041517 |
src/cron/isolated-agent.session-identity.test.ts |
small-21 |
97890041713 |
src/cron/isolated-agent.delivery-awareness.test.ts |
small-22 |
97890041654 |
src/commands/onboard-custom.test.ts:113 — timeout |
small-23 |
97890041608 |
src/secrets/runtime.auth-migration-isolation.test.ts:34 — timeout |
Cross-checks:
- This PR's diff (
bash-tools.exec-support.{ts,test.ts},bash-tools.process.{ts,poll-timeout.test.ts},session-tool-result-guard.test.ts) touches none of the test files above. - PR fix(sandbox): resolve bare upload handles to staged inbound media #129269 (run
32865420163, head3331862f2) and PR fix(config): bound JSON nesting before parsing to prevent native stack overflow #129324 (run32864439916, head9915ef6f6) — both independent — fail the identicallarge-3/9/11/17/29andsmall-18/20/21/22/23sets. Same base, same failures, three unrelated PRs. - Main run
32877561017(latest main, head4800ef4) is itself red on the samelarge-3/4/9/11/17/29shards (large-19is green there). Main is independently broken on this set.
Disposition: large-19 is fixed by 13b12e7840 and will rerun on the next push's CI. Everything else is a pre-existing main-branch red window and should clear once main is green; no further fix is included here.
|
@clawsweeper re-review for head 13b12e78 (just pushed: large-19 bash-tools regression fixed in the same diff; evidence comment posted for the rest as main red window). Thanks! |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
"PR context and evidence" is green on this PR — no body changes or push needed. What happened: the checker (
Once the evidence sections were in the body, the check passed on the immediate re-run at the same head Note: the remaining red checks (checks-node-compact-large-3/4/17/20, small-20/21/22, ci-gate) are from the same main red-window run (Aug 25 18:05Z); push-to-main has been green since 12:38Z today (32969689537, 32969705904, 32970558530). Happy to have those re-run too if useful. |
13b12e7 to
6092cda
Compare
6092cda to
34f704e
Compare
|
Thanks @Finn763! Proof: A real child produced 250,000 characters through foreground exec and background process poll/log. Current main lost the aggregate-loss notice after SQLite persistence; the merged candidate kept both that notice and the session result-cap notice after reopen. Exact-head CI passed.
Example
|
…law#128997) Exec and process results placed their aggregate-retention disclosure after retained output, so the SQLite session result cap could hide the earlier unrecoverable loss. Own the disclosure once and place it first across foreground exec, process poll, and process log. Preserve the separate poll omission and log paging semantics, and cover the composed persistence boundary with a red-to-green regression. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
OpenClaw can discard early exec output at its aggregate retention cap. The exec and process tools disclose that loss, but they placed the disclosure after the retained output. The session result cap keeps the head, so it could remove the producer disclosure while keeping only its own later truncation notice.
The persisted transcript then looked fully accounted for even though an earlier, unrecoverable loss was hidden. This can make an agent retry the same read without knowing why the output is incomplete.
Partially addresses #128967. The separate find and grep stderr-tail paths remain tracked there.
Root Cause
The exec/process owner retained a capped output tail and appended the aggregate-loss notice. The SQLite transcript guard then applied a second, head-preserving cap. That composition removed the first notice.
process pollalso appended its retained-output omission note. Under the same cap, the transcript could lose the distinction between output discarded at the aggregate cap and output still available throughprocess log.Fix
Evidence
The live proof runs a real Node child that writes 250,000 characters through the production foreground exec and background process paths. It persists each tool result through the guarded SQLite session manager, reopens the database, and inspects the stored text.
Exact main
eeec0d4b2a0cada60046aba548d005cd7ace125ais red:Exact candidate
34f704e3fdbd7308a05fd98960a7d43332412254is green:process log.Regression proof:
Scope
Production is +4 lines after unifying the duplicate notice text. Tests are +36 lines. No configuration, dependency, protocol, schema, migration, or documentation contract changes.