Skip to content

Keep long-lived conversations current with the checkout workspace #42

Description

@nishu-builder

Problem

A CAOS conversation currently carries both its durable transcript and its repository snapshot in one commit chain. Long-lived conversations therefore keep seeing the tree they originally branched from even when the checkout that launches the TUI has moved far ahead.

This is confusing because the local TUI executable can be current while the agent workspace is stale. In the observed talk-1 case, the conversation was rooted at f7ebda4, roughly 80 commits behind the checkout, so the agent correctly reported that no TUI code existed. The conversation also carried four executable-bit-only changes from an older tool round trip, demonstrating that infrastructure residue can complicate a naive merge.

Constraints

  • Preserve the first-parent conversation transcript and stable conversation identity.
  • Preserve reproducibility: every agent turn must still point to the exact workspace it saw.
  • Do not silently fold upstream changes into the conversation diff or published PR.
  • Do not rewrite old transcript commits.
  • Surface conflicts before calling the model or advancing the conversation ref.
  • Use the checkout target selected when the TUI starts rather than assuming main; a user may intentionally be running from the top of a feature stack.

Design direction to explore

Refresh the workspace on the next human turn by making that human commit a merge: first parent is the prior conversation head, second parent is the checkout target, and its tree is the three-way-merged workspace. First-parent traversal continues to represent the transcript, while the second parent records the refreshed workspace baseline. Workspace diffs and published branches would compare against the latest refresh parent.

Potential policy: clean descendant refreshes may happen automatically on send; conflicts stop before the LLM call and list paths; divergent target changes require an explicit /sync <rev>.

Before implementing this, fix or deliberately normalize the executable-bit round-trip issue so infrastructure-only mode changes do not create false merge conflicts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions