Skip to content

feat(lineage): write fork lineage back into Codex rollouts - #83

Open
malihashar wants to merge 1 commit into
skillsynchq:mainfrom
malihashar:feature/lineage-write-back
Open

malihashar wants to merge 1 commit into
skillsynchq:mainfrom
malihashar:feature/lineage-write-back

Conversation

@malihashar

@malihashar malihashar commented Oct 11, 2026 •

Copy link
Copy Markdown

Closes #82.

Problem

Meta::lineage is read-only today — forked_from_id is read from Codex rollouts, but nothing ever writes it back. A session copied via continue <id>#range or crop loses its parent link entirely once written back out.

Fix

Codex's from_common now writes Fork lineage as session_meta.forked_from_id for same-harness copies. Scope is intentionally narrow:

  • Written: same-harness Codex copies (Fork, UUID parent).
  • Not written: Spawn/Continue relations (no matching native field without changing the session's meaning), non-UUID parents, and cross-harness copies (Lineage::parent only makes sense within one harness).
  • Other harnesses (pi/Campfire, OpenCode, Claude Code) still don't write lineage — their native fields mean something different or aren't reachable from from_common. Covered by a byte-for-byte cross-harness test.

Open questions (flagged in #82)

  • Should txcript's own copies be tagged Fork or Continue?
  • Is Fork accurate for an edited crop copy, not just a plain continue?
  • Cross-harness provenance isn't representable under the current model and would need a separate design decision.

This branch has not been deployed

No deployments
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.

RFC: write lineage back into native sessions on continue

1 participant