feat(pi): replay-mode flag on RunOptions (Batch 3 Unit 3) - #12
Merged
Conversation
Add replay_mode: bool = false to loop.RunOptions. When set, a verified apply_edit skips both the approval callback and applyPreparedEdit, but still emits the proof_card transcript entry. This lets future replay/ resume code reconstruct transcripts from events.jsonl without writing edits back against a possibly-diverged workspace. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
srdjan
added a commit
that referenced
this pull request
Jul 12, 2026
#10 Cap a tool_result body at 32 KB before it enters the transcript, with a marker pointing the model at a workspace_read_file range re-read. A single large output (a full-file read, a long diagnostic blob) no longer inflates the input token count of every subsequent roundtrip in the turn. #12 Auto-compact after each RPC turn, mirroring the interactive REPL, so a long-lived IDE session on the RPC surface never dead-ends on a PromptTooLong the machine client cannot resolve with /compact. A notification is emitted when compaction fires. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
srdjan
added a commit
that referenced
this pull request
Jul 13, 2026
Move the eight post-v0.17.0 expert commits (#1-#12) into a new [0.18.0] CHANGELOG section and bump the version in lockstep: build.zig.zon and root.zig's major/minor/string (release.yml enforces tag == zon == root). The engine, runtime, and analyzer contract are unchanged from 0.17.0 (same policy hash and semantics hash); 0.18.0 is purely the `zigttp expert` loop - Sonnet default, model-aware output budget + truncation detection, surfaced Cost Contracts + comptime property drift gate, tool_result byte cap + RPC auto-compact, OpenAI honest demotion, transcript-fidelity retry, and the `zigttp ledger stats` subcommand. Refresh the version-pinned test assertions that read the live version (root version test, expert persona/meta) and the self-contained fixtures that carried a stale 0.17.0 (capsule manifest sample, release-doctor fixture, meta golden illustrative value). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
replay_mode: bool = falsetoloop.RunOptions.replay_modeis true, a verifiedapply_editskips both the approval callback andapplyPreparedEdit; the proof card still flows through the transcript. This unblocks Batch 4 replay/resume code that reconstructs transcripts fromevents.jsonlwithout re-applying edits against a possibly-diverged workspace./Users/srdjans/.claude/plans/study-the-plan-provided-clever-wadler.md(Batch 3 Unit 3).Test plan
zig build test-expert-appzig build testzig buildprintf 'help\nquit\n' | timeout 10 ./zig-out/bin/zigts expert— stdout contains/verifyandRegistered tools:printf '/meta\nquit\n' | timeout 10 ./zig-out/bin/zigts expert— stdout containscompiler_version🤖 Generated with Claude Code