Skip to content

Reload-all can resurrect a closed agent or double a replaced one; it has no commit-time ownership check #1282

Closed

Description

@Juliusolsson05

session.ts reload-all loop ignores killSessionBackendIfOwned's false and spawns from the snapshot meta: (a) an agent closed during the loop comes back under a new id (or as an invisible orphan if its project closed); (b) a replaceSession on the same agent during the loop yields two successors on one provider transcript. replaceSession has canCommit (#815); reload-all does not. Also: reload-all copies draftInput from a snapshot taken before the slow kill/spawn sequence (text typed meanwhile is lost), never copies draftImages, and (like replace) drops unreadSince/unreadKind, so toggling dangerous mode clears every 'finished, not seen' marker. Severity P2.

Found by the Stage 3 C2 hunt; lines are origin/main 9c6e48f. Findings file: temp/quality-loop/hunt-c2.md.

🤖 Generated with Claude Code

Activity

  1. added
    bugSomething isn't working
    type:bugSomething works wrong
    class:C2-identityIdentity/ownership across reload, replace, restore, wake
    sev:P2Real bug with a workaround
    on Sep 25, 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

    bugSomething isn't workingclass:C2-identityIdentity/ownership across reload, replace, restore, wakesev:P2Real bug with a workaroundtype:bugSomething works wrong

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions