Skip to content

fix(shell): preserve final summaries beyond the output cap - #253

Merged
AetherAI3 merged 1 commit into
mainfrom
codex/247-shell-final-output
Oct 1, 2026
Merged

AetherAI3 merged 1 commit into
mainfrom
codex/247-shell-final-output

Conversation

@AetherAI3

@AetherAI3 AetherAI3 commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Why

Verbose shell commands dropped their real final summary after 64 MiB. Shared console shell commands also retained only their first 8,000 characters. Both paths now retain actual head and final output with fixed memory, while stdout/stderr continue draining and streaming.

Closes #247.

What changed

  • Add shared fixed-buffer head/rolling-tail capture with an 8,000-byte body budget, explicit omitted decoded UTF-8 byte counts, and valid code-point boundaries.
  • Decode stdout and stderr independently; flush before formatting. Preserve authoritative exit status and cancellation 130 / timeout 124.
  • Apply capture to one-shot tools, persistent user/model tools, and explicit /shell-result sharing. Persistent callbacks continue beyond the retention budget.
  • Add 16 focused regressions: real 66 MiB child runs, a single 65 MiB append, interleaved pipes, split UTF-8, retention/omission checks, both termination paths, resets, and clean subsequent output.
  • Replace fixed-delay console routing test assumptions with observed-state waits and controlled model-response gates, retaining all original assertions.

Verification

  • Original seven integration regressions reproduced failure before the fix and passed afterward.
  • Focused capture tests: 15 passed; console sharing regression passed; hardened console routing tests: 11 passed.
  • Typecheck, generated docs (6 outputs), production package verification, and four independent Python contract verifiers passed.
  • Independent capture review: 5,000 randomized Unicode cases; independent session review: complete live output, final summaries, UTF-8, and command isolation.
  • Final npm test exited 0. Complete bounded full-suite report: 2,930 tests; 2,919 passed; 11 skipped; 0 failed; 0 cancelled (143.0 seconds). The final verifier used node --test --test-isolation=none --test-timeout=30000 --test-reporter=tap --test-reporter-destination=<report> "dist/test/**/*.test.js" to prove all tests finished.
  • Hosted CI/CodeQL could not run: all five jobs were rejected before their first step because GitHub reports the account is locked due to a billing issue. CI run, CodeQL run. These are infrastructure failures; Windows verification remains unavailable. Workflow and protection settings were not changed.

Acceptance mapping and reproduction evidence: docs/issue-247-validation.md.

Remote source tree exactly matches the local tested tree: 2ac4ecfbebd4a2a8aaca8b5bab7210bae56e2b95.

Scope and risk

Execution authority and status prefixes remain unchanged. The payload buffers retain 7,920 bytes, reserving room within the 8,000-byte body budget for the elision notice; Unicode output may therefore be shorter than the old character-based cap. Omission counts describe decoded/normalized UTF-8 bytes. Live callbacks receive all decoded output and consumers remain responsible for their own retention. File/web/search character caps remain unchanged. Local verification is Linux; persistent Bash tests skip unsupported platforms.

@AetherAI3
AetherAI3 marked this pull request as ready for review October 1, 2026 14:23
@AetherAI3
AetherAI3 merged commit e4845eb into main Oct 1, 2026
2 of 7 checks passed
@AetherAI3
AetherAI3 deleted the codex/247-shell-final-output branch October 1, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Shell output cap drops final summaries after 64 MiB

1 participant