Skip to content

A terminal migrates a chat another process holds before it knows the chat is held #2063

Open

Description

@AbirAbbas

Found while fixing #2046. When a terminal opens a chat that another process on the same computer holds, openV3Agent (cmd/codeaf/chatv3.go) runs v3Migrated on it before the session open learns the journal is locked. #2046 stopped the sync drive from acting in that window; the migration write itself still happens.

Window: from the terminal's open until open() returns ErrSessionLocked.

Harm: not shown yet. Possible effects are a write into another process's live journal or a migration racing its writer.

Repro idea: two processes on one codeaf home (the desktop app's engine holding a chat, a terminal codeaf chat --session opening the same chat); snapshot the journal and the held chat's state before and after the terminal opens and quits, repeated, and with a chat that needs migrating.


🤖 Generated with Claude Code

Activity

  1. added
    bugSomething the code does that it should not
    area:sessionThe engine — turns, tasks, the toolbelt, checkpoints
    on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:sessionThe engine — turns, tasks, the toolbelt, checkpointsbugSomething the code does that it should not

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions