Skip to content

fix(pi-subagents): prevent oversized stdout string failures - #46

Merged
tasercake merged 1 commit into
mainfrom
fix/pi-subagents-stdout-string-limit-immediate
Jul 27, 2026
Merged

fix(pi-subagents): prevent oversized stdout string failures#46
tasercake merged 1 commit into
mainfrom
fix/pi-subagents-stdout-string-limit-immediate

Conversation

@tasercake

Copy link
Copy Markdown
Owner

Summary

  • restore child Pi print mode instead of persisting cumulative JSON streaming events
  • rely on the child prompt runtime for provider-error exit handling
  • bound legacy stdout, stderr, and session recovery reads at 16 MiB
  • preserve existing results and terminalize dead records without throwing on oversized logs

Regression

Commit 5deb747 enabled JSON mode. Pi JSON message_update events include cumulative message state, producing stdout logs larger than V8's maximum string length when finalization called readFileSync(..., "utf-8").

Validation

  • 8 focused Bun tests pass (print args, provider failures, autosave including valid JSON text, preserved results, oversized reconciliation)
  • full Bun compatibility run: 56 tests pass; two pre-existing harness/runtime incompatibilities remain (node:test skip under Bun and the known duplicate lifeline watcher case)
  • repository CI uses official Node 22 and runs the package's npm test script

@tasercake
tasercake merged commit a86e149 into main Jul 27, 2026
1 check passed
@tasercake
tasercake deleted the fix/pi-subagents-stdout-string-limit-immediate branch July 27, 2026 10:59
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.

1 participant