Skip to content

fix(pi-subagents): make output artifacts durable and bounded - #47

Merged
tasercake merged 2 commits into
mainfrom
fix/pi-subagents-durable-output-artifacts
Jul 27, 2026
Merged

fix(pi-subagents): make output artifacts durable and bounded#47
tasercake merged 2 commits into
mainfrom
fix/pi-subagents-durable-output-artifacts

Conversation

@tasercake

Copy link
Copy Markdown
Owner

Summary

  • make child-owned result.log the authoritative result and write fallback output atomically during child session shutdown
  • preserve explicit child-written results and provider-error results
  • remove all parent result-recovery reads from stdout.log
  • stream child session JSONL line by line for crash recovery with bounded per-line memory
  • cap stdout diagnostics at 16 MiB and stderr diagnostics at 4 MiB while continuing to drain child pipes
  • compact oversized legacy stdout after a result is safely preserved or recovered
  • avoid importing the child-only prompt runtime in the parent extension, preventing duplicate lifeline watchers

Validation

  • 21 focused tests pass for prompt-runtime persistence, atomic preservation, provider failures, capped logs, oversized stdout, legacy compaction, and streamed large-session recovery
  • full Bun compatibility run passes 60 tests; Bun's node:test skip and child-process fd incompatibilities prevent four harness cases from running reliably under Bun
  • TypeScript check reaches only the pre-existing agent_settled typing mismatch from the package's older devDependency declarations
  • repository CI runs the canonical suite with official Node 22

@tasercake
tasercake merged commit c573b67 into main Jul 27, 2026
1 check passed
@tasercake
tasercake deleted the fix/pi-subagents-durable-output-artifacts branch July 27, 2026 11:13
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