Skip to content

Stronger rollout identity for resume (explicit lineage id, not cwd+content heuristics) #12

Description

@Juliusolsson05

The fork detector added in #9 identifies a resumed session's forked rollout by cwd + copied-history item-id overlap. This is a heuristic: it works because a reconstructed rollout copies prior history verbatim, but:

  • it cannot follow a fork that copies no history,
  • it depends on opaque item ids and a same-cwd co-requirement,
  • it needs a bounded watch window and a lineage threshold tuned by hand.

The robust long-term fix is an explicit identity instead of content inference:

  1. Codex writes a stable resume-lineage id into session_meta (a forked/reconstructed rollout records the id of the session it descends from), or
  2. Agent Code obtains the provider session id over an explicit Codex API and the tailer attaches by that id rather than by filename / cwd / content.

Either removes the heuristic entirely. Tracked from the in-code comment in tailResumeRolloutFile ("The stronger long-term fix is for Codex to write a stable resume lineage id…").

Refs #9, Juliusolsson05/agent-code#159.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions