Skip to content
#

Claude Code

Save Claude Code sessions with the SpecStory CLI.

#

Before you start

Install Claude Code and the SpecStory CLI. Open your project folder in a terminal and run specstory check.

#

Run with SpecStory

bash

specstory run claude

Use your agent as usual. SpecStory saves the conversation in .specstory/history/. Cloud sync can run when you are logged in; add --no-cloud-sync to keep the session local.

#

Export existing sessions

bash

specstory list claude
specstory sync claude

# Export a single session
specstory sync claude -s <session-id>

SpecStory reads the agent's existing history from ~/.claude/projects/ and matches it to your project. You can export sessions even if you did not start them through SpecStory.

#

Capture in the background

bash

specstory watch claude

Leave this running while using the agent directly. Stop watching with Ctrl+C.

#

Resume a session

Run specstory resume to choose a previous session and an installed target agent. See search and resume for cross-agent and cross-project handoffs.

#

Troubleshooting

If the agent is not detected, check its installation and your PATH. If no sessions appear, run the commands from the project where you used the agent and confirm that its local history still exists.

See the CLI reference for custom commands, configuration, and debug logging.