I'd always vaguely assumed this.

"I know API calls go through Anthropic's cloud. But when running the claude command from the terminal, I didn't think the session exchanges were being retained as logs on the server side."

Processing happens in the cloud, but logs stay local only. That was my understanding.

When I looked into it, that understanding was wrong.


CLI Session Logs Are Also Retained Server-Side

Claude Code's CLI sends a request to Anthropic's cloud every time you submit a prompt. And those "user prompts and model outputs" are retained server-side, as explicitly stated in Anthropic's official documentation.

"Claude Code sends data over the network. This data includes all user prompts and model outputs."

There's no distinction between CLI and desktop app. What applies is your plan and settings.

Local cache exists to make session resumption convenient. Logs are stored "locally as well" — not "locally only."

# Session list (metadata) is saved here
~/.claude/history.jsonl

# Actual conversation transcripts are here
~/.claude/projects/<project>/

How Long Does Data Stay on the Server?

Retention periods vary by plan.

Consumer Plans (Free / Pro / Max):

Commercial Plans (Team / Enterprise / API Key):

Privacy settings can be changed at claude.ai/settings/data-privacy-controls.

There's more granular control than I expected. But it's worth checking what the defaults are set to at least once.


Session History Is Accessible from the Terminal Too

When I wanted to check past sessions, I initially had no idea where to look. The desktop app shows a list, but the terminal shows nothing.

But there are proper methods.

# Interactively display past sessions → select and resume
claude --resume

# Resume the most recent session directly
claude --continue
# or
claude -c

# Resume a specific session by ID
claude --resume <session-id>

# Incremental search through past prompts during a session
Ctrl+R

# Export the current session to a file
/export [filename]

Running claude --resume is the quickest approach. A picker appears and you can select from past sessions.


Four Environments Managed Separately

This is the part where I thought "so that's how it's designed."

Environment Session History Storage Cross-Environment Sync
CLI (Terminal) Local (~/.claude/) None
Desktop App Code Tab Local (app-specific path) None
Cowork Local None
Web (claude.ai) Cloud None

Everything is separate. Session history built up in the CLI isn't visible from the desktop app. Sessions created in the desktop app's Code tab don't appear in the browser.

Desktop app Code tab sessions are stored in a different location from the CLI's ~/.claude/.

macOS: ~/Library/Application Support/Claude/claude-code-sessions/<accountId>/<orgId>/
Windows: %AppData%\Claude\claude-code-sessions\<accountId>\<orgId>\

There are actual GitHub issues reporting things like "I have 96 sessions in CLI but the desktop app's Local filter only shows the 1 session created in the desktop app." Furthermore, when a recent update changed the session storage directory name, incomplete migration caused sessions to disappear from the sidebar after restart (the data itself remains on disk, but the app can no longer reference it).


On the Speed Difference Between Desktop App and CLI

This was my initial question. Is the desktop app slower than the CLI?

No quantitative benchmarks have been officially published. However, what we do know:

If speed is the top priority, use the CLI. If you prefer visual feedback and easier session management, use the desktop app. Rather than one being absolutely superior, it's about choosing based on your use case.


My Current Approach

How I currently use each environment:

Having session history scattered across environments is honestly inconvenient, but conversely, if you stay conscious of which environment you're working in, it's not too much trouble. The problem arises when you start using them without being aware of the environment.

The assumption that "CLI logs stay local only" has been cleanly cleared up for me this time. I recommend reviewing your privacy settings at least once.


Things I Still Don't Know / Want to Investigate Next


Related Books

For those who want to master Claude Code more deeply, the following books may be helpful.

[📦 商品リンク: moshimo-book-9CeFY]

[📦 商品リンク: moshimo-book-fINTJ]