# Where Cline stores your task history

> Cline v4 and the Cline CLI keep sessions in ~/.cline/data, with older tasks in VS Code's globalStorage. Where each lives, and how to resume, export and delete them.

Source: https://groundedby.com/agents/cline (updated 2026-10-29)

Cline, the open-source coding agent for VS Code and the terminal, moved its storage in v4.

## Where the files are

**v4 extension and the Cline CLI:**

```text
~/.cline/data/
├── db/sessions.db                      # SQLite index of sessions
└── sessions/<id>/<id>.messages.json    # one folder per session
```

On Windows: `C:\Users\<user>\.cline\data`. `CLINE_DATA_DIR` or `--data-dir` moves it.

**Before v4** (still readable, no longer written): VS Code's globalStorage, under `saoudrizwan.claude-dev/tasks/<taskId>/`, with `api_conversation_history.json`, `ui_messages.json` and `task_metadata.json` per task. Older files use Anthropic's message format and track tokens and cost per task.

## Resume, export and delete

In the extension, the History view resumes, deletes or clears tasks (favorites are kept).

With the CLI:

```bash
cline history [--json]
cline --id <id>                          # resume
cline history export <id> -o task.html
cline history delete --session-id <id>
```

## Privacy notes

Sessions are local unless you use Cline Cloud sessions (ids starting `ses-`). Enterprise prompt storage backs up to the customer's own bucket.

The groundedby [evaluator](/evaluate) does not read Cline sessions yet.

## Questions

**Where does Cline save tasks?**

Since v4, in ~/.cline/data - an index at db/sessions.db and one folder per session under sessions/. Tasks from before v4 stay in VS Code's globalStorage under saoudrizwan.claude-dev/tasks, and are read-only.

**How do I export a Cline session?**

With the CLI, cline history export <id> -o session.html. In the extension, export opens the task's folder.

## Sources

- [Cline source, storage paths](https://github.com/cline/cline/blob/main/sdk/packages/shared/src/storage/paths.ts)
- [Cline docs, CLI reference](https://github.com/cline/cline/blob/main/docs/cli/cli-reference.mdx)
