Standalone resume-fidelity fixes (claude reader, codex resume identity, thinking on import)#143
Draft
benbaarber wants to merge 1 commit into
Draft
Standalone resume-fidelity fixes (claude reader, codex resume identity, thinking on import)#143benbaarber wants to merge 1 commit into
benbaarber wants to merge 1 commit into
Conversation
Three fixes independent of the compaction work, split out of #108: - toolpath-claude reader: a mid-write flush boundary can concatenate two JSON objects on one physical line; whole-line parsing dropped both (observed on a live import — a turn_duration + ai-title pair). read_conversation and read_from_offset now stream-parse each line, keeping every complete value. - path resume (codex): mint a deterministic fresh session id instead of reusing the source id — reuse produced two rollouts sharing one id, making `path p import codex --session` ambiguous, letting the thread-row INSERT OR REPLACE clobber the native session, and confusing `codex resume <id>` about which file to load. The registered thread title now comes from the first non-envelope user message instead of the `<environment_context>` XML (verified against codex 0.144.4's threads table). - path p import claude / path share: derive with thinking included. Dropping it degrades resume (the harness re-reads thinking) and leaves empty-thinking assistant turns with no content to project.
|
🔍 Preview deployed: https://bc0fbb76.toolpath.pages.dev |
ben-emp
pushed a commit
that referenced
this pull request
Jul 23, 2026
…1.2.0) Restacked onto ben/items-ir (#144) with the standalone fixes split to #143; the pre-restack 43-commit history is preserved at ben/compaction-pre-split. The Compaction item + the conversation.compact step type (kind v1.2.0): a context-compaction boundary recorded as its own step between the turns it separates, with trigger, summary, pre_tokens, and the anchor-based kept contract (kept_from + expand_kept; the wire carries the expanded contiguous run). Compaction provenance is a closed typed set — no catch-all extra; native detail richer than the typed fields is deliberate loss. Per-provider support, each verified against the real harness TUI by resuming projected sessions (versions in docs/agents/tui-drift-check.md): - claude: compact_boundary + synthetic summary → typed boundary and back, preservedMessages as the kept run, transcript-only + isMeta render flags, empty-turn thinking-block projection. - codex: compacted marker → wholesale boundary (2026-07 payload: encrypted summary + prefix-keep documented as deliberate loss); projector emits the event_msg/context_compacted marker the TUI renders, with native turn_context placement. - opencode: per-boundary summary pairing, compaction-host parent redirects, tailStartID → kept anchor. - pi: compaction entries with parent-chain kept expansion; model_change/thinking_level_change/label as typed events with the chain's model context threaded into projected assistant messages. - copilot: the observed 1.0.68 session.compaction_start/complete pair mapped both directions (wholesale + summary). - gemini/cursor: documented no-boundary. Verification: executable round-trip oracle (testing::{check_view_invariants, assert_fixpoint}), compaction proptests, real captured compacted sessions for claude/codex/pi/ copilot/opencode as fixtures with looped stability tests, the cross-harness compaction matrix (kept-anchor capability flags), the env-gated real-session matrix mode, and import-time event-type surfacing.
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.
Split out of #108 — three fixes with no dependency on the compaction work, found while verifying projected resumes against the real harness TUIs.
path resumemints a deterministic fresh session id (reusing the source id created ambiguous duplicate rollouts and clobbered the native session'sthreadsrow via INSERT OR REPLACE), and the registered thread title skips system-envelope messages instead of using the<environment_context>XML. Verified against codex 0.144.4.path p import claude/path sharederive with thinking included — dropping it degrades resume and leaves empty-thinking turns contentless.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.