Skip to content

Add deterministic abortable run-once Pi session streaming - #131

Merged
rochecompaan merged 10 commits into
mainfrom
agent/issue-123-add-deterministic-abortable-run-once-pi-session
Aug 1, 2026
Merged

Add deterministic abortable run-once Pi session streaming#131
rochecompaan merged 10 commits into
mainfrom
agent/issue-123-add-deterministic-abortable-run-once-pi-session

Conversation

@rochecompaan

@rochecompaan rochecompaan commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Allocate exact parent Pi session files for observed run-once prompts and pass them with --session.
  • Stream exact session JSONL serially with callback backpressure, strict errors, UTF-8-safe reads, cancellation, and aggregate terminal causes.
  • Keep triage on legacy session-dir observation while adding regression coverage.

Validation

  • node --test src/cli/commands/run-once/pi.test.ts src/cli/commands/triage/*.test.ts — 187 tests passed.
  • npm run test:run-once — 431 tests passed.
  • npm run lint:ts — passed with zero warnings.
  • npm run lint:md — 177 files, zero errors.
  • git diff -- package.json npm-shrinkwrap.json package-lock.json — no output.
  • Final validation-readiness reviewer also ran npm test — 1,154 tests passed.

Reviews

  • Final Codex full-worktree review passed after accepted fixes.
  • Final thermo-nuclear review passed with one deferred minor test-organization suggestion.
  • Final validation-readiness review passed all required commands.

Closes #123

Patchmill run cost

Stage Model Prompt tokens Output tokens Estimated cost (USD)
Planning gpt-5.5 1,549,932 18,856 $1.7443
Development environment gpt-5.5 670,781 2,262 $0.7353
Implementation gpt-5.5 6,136,856 18,466 $4.5119
Implementation gpt-5.6-sol 14,146,920 82,481 $14.2658
Implementation gpt-5.6-terra 13,632,353 47,926 $6.3315
Implementation subtotal 33,916,129 148,873 $25.1092
Total 36,136,842 169,991 $27.5888

Prompt tokens include uncached input, cache reads, and cache writes. Cost is an estimate based on Pi's recorded model pricing and includes parent and subagent sessions.

@rochecompaan
rochecompaan merged commit d64f194 into main Aug 1, 2026
2 checks passed
@rochecompaan
rochecompaan deleted the agent/issue-123-add-deterministic-abortable-run-once-pi-session branch August 1, 2026 19:17
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.

Add deterministic, abortable run-once Pi session streaming

1 participant