Skip to content

Session resume fails when run from different directory than where session was created #183

@cpark4x

Description

@cpark4x

Bug Summary

amplifier session resume <id> fails with "No session found" when the session exists but was created in a different project/directory.

Reproduction Steps

  1. Create a session from home directory:
    cd ~
    amplifier run --bundle amplifier-dev
  2. Exit the session
  3. Change to a different directory:
    cd ~/some-other-project
  4. Try to resume the session:
    amplifier session resume c0eeab0a
  5. Get error: No session found matching 'c0eeab0a'

Evidence

  • amplifier session list from home directory shows the session exists: "Building Voice-to-Text Tool" with ID c0eeab0a...
  • Session directory exists at: ~/.amplifier/projects/-Users-chrispark/sessions/c0eeab0a-6fb9-4841-ba86-47e2ee933e07
  • But the CLI reports "No session found" when run from a different directory

Current Behavior

Returns misleading error No session found matching 'c0eeab0a' even though the session exists in another project.

Expected Behavior

When a session ID is not found in the current project, the CLI should:

  1. Search all projects for the session
  2. If found in another project, inform the user and launch it automatically
  3. Example message:
    Session 'c0eeab0a' found in project '-Users-chrispark' (not current directory). Resuming...
    

Impact

Confusing UX for users who work across multiple directories. The error message implies the session does not exist, when in reality it just exists in a different project context.

Suggested Implementation

  • Add a fallback search across all project directories when session ID not found in current project
  • Provide clear messaging about which project the session belongs to
  • Consider adding a --global flag to session list to show sessions across all projects

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