Skip to content

Claude sessions don't always resume correctly on restore #75

Description

@mortenaslo

Bug

When AutoResumeClaude is on and the app restores sessions on startup, the Claude conversation is not always picked up correctly — some sessions come back as a fresh claude invocation instead of resuming the prior conversation.

Where it happens

The resume path looks at ClaudeSessionService.GetLastSessionId(session.WorkingFolder) and appends --resume <id> to the launch command. Suspected failure modes worth checking:

  • Multiple Claude sessions in the same WorkingFolder — they all resolve to the same "last session id" and so they can't both resume their respective conversations.
  • The Claude project files under ~/.claude/projects/ may not yet have a session id for a brand-new conversation that was open at app close.
  • Sleep/wake vs. close/reopen vs. app-restart may take different paths.

Expected

Each restored Claude session resumes the conversation it had open at app close, deterministically.

Notes

Probably needs Claude session id to be tracked per ShellSession (persisted to state.json) at the time the session is launched / observed, rather than re-derived from the folder at restore time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions