Generated banner for Cline Session History
Generated logo for Cline Session History

Cline Session History

ClineOfficialPublished by Cline

  • Skill
  • Tool integration
  • Agent tooling
  • Apache-2.0
  • Low risk
  • Has scripts

From the author

Search and browse Cline session history. Use when the user asks to find, list, inspect, or export Cline sessions by time period, prompt content, status, model, provider, source, mode, workspace, or other criteria. Also use when the user wants to read a session transcript or export sessions to a directory. Trigger phrases include "find my session", "search my session history", "show me past sessions", "what was that session where", "find the session that started with", and any mention of past Cline conversations.
— the description by Cline

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The cline-session-history skill provides a command-line interface to interact with locally stored Cline session data. It allows users to query past interactions based on various metadata such as timestamps, model names, status, or prompt content. Beyond simple searching, the skill supports retrieving full conversation transcripts and exporting session files to specified directories, facilitating audit, review, or data migration tasks.

What it does

  • Searches local session metadata and conversation transcripts.
  • Filters sessions by time, status, model, source, or prompt content.
  • Retrieves full conversation transcripts for specific sessions.
  • Exports session files to a designated directory.
  • Supports both JSON metadata files and SQLite database lookups.
  • Provides granular control over output format and content types.

When to use it

  • When you need to locate a specific past conversation or task.
  • When auditing session outcomes or debugging failed interactions.
  • When you need to export historical data for documentation or analysis.
  • When comparing model performance or behavior across different sessions.

Advantages

  • Enables precise filtering of large session histories.
  • Supports both simple and complex search criteria.
  • Provides direct access to raw transcript data.
  • Simplifies the process of backing up or moving session files.

Usage examples

“Find my session from yesterday that failed.”
The agent executes the search script with --since 1d and --status failed to list relevant sessions.
“Show me the full transcript for session 1781991507587_pozk0.”
The agent retrieves and displays the complete message history for the specified session ID.
“Export all sessions from last week to my desktop.”
The agent runs the search script with --since 1w and --export to copy the files to the specified path.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/cline/cline-session-history/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip cline-session-history.zip -d .agents/skills

Documentation by Cline

Cline Session History

Search and browse Cline session history stored on the local machine. Sessions live in ~/.cline/data/sessions/ as individual JSON metadata files and conversation transcript (.messages.json) files. Older sessions may also be in a sessions.db SQLite database.

When to Use This Skill

  • "Find my session from the last hour about..."

  • "Find my session that started with this prompt..."

  • "Find the session where I asked about..."

  • "Show me sessions that used model X"

  • "What sessions failed yesterday?"

  • "Show me the transcript for session <id>"

  • "Export sessions from last week to a folder"

  • "What was that session where..."

  • Any request involving past Cline conversation history

How to Use

The search script lives alongside this file at scripts/search_sessions.py, relative to the skill's own directory. Resolve it against the directory that contains this SKILL.md — not the current working directory — so it works regardless of where the command is run from.

Script path: scripts/search_sessions.py (relative to this skill's directory)

The examples below use scripts/search_sessions.py; prefix it with the skill directory's absolute path when running from elsewhere.

All filters are optional and combine with AND logic.

Quick Examples
# Sessions from the last 10 minutes
python3 scripts/search_sessions.py --since 10m

# Sessions between two dates with "chatgpt" in the prompt
python3 scripts/search_sessions.py --since 2026-06-01 --until 2026-06-21 --prompt chatgpt

# Find a session by its starting prompt (quoted substring match)
python3 scripts/search_sessions.py --since 1d --prompt "find some code that should be improved" --full-prompt

# Non-interactive sessions that failed
python3 scripts/search_sessions.py --no-interactive --status failed

# VS Code extension sessions using Claude models, full prompts
python3 scripts/search_sessions.py --source vscode --model "claude" --full-prompt

# Full transcript of a specific session
python3 scripts/search_sessions.py --session-id 1781991507587_pozk0 --transcript

# Export matching sessions to a directory
python3 scripts/search_sessions.py --since 1d --export ~/tmp/exported-sessions
Time Filters

Both --since and --until accept:

  • Relative: 10m, 30min, 2h, 1d, 1w (minutes, hours, days, weeks)

  • ISO 8601: 2026-06-20, 2026-06-20T21:30:00Z, 2026-06-20T21:30:00+00:00

All Available Filters
FilterDescription
--since <time>Sessions started after this time
--until <time>Sessions started before this time
--prompt <text>Case-insensitive substring search in prompt
--prompt-regex <pattern>Regex search in prompt (case-insensitive)
--status <status>running, idle, completed, cancelled, failed
--source <source>cli, vscode, etc. (exact match)
--provider <name>Provider name, exact match (e.g. cline)
--model <text>Model name substring, case-insensitive (e.g. claude)
--mode <mode>plan or act
--cwd <path>Working directory substring match
--session-id <id>Exact session ID lookup
--interactive / --no-interactiveFilter by interactive flag
--team-only / --no-teamFilter by team session flag
--subagents / --no-subagentsInclude/exclude subagent sessions
Output Options
OptionDescription
--full-promptShow full prompt text instead of truncated
--transcriptPrint full conversation transcript
--max-messages <n>Limit messages in transcript output
--content-types <types>Comma-separated: text,thinking,tool_use,tool_result,image
--export <dir>Copy matching session files to a directory
--limit <n>Max number of sessions to return
--jsonOutput as JSON
Data Source Options
OptionDescription
--sessions-dir <path>Custom sessions directory (default: ~/.cline/data/sessions)
--db-path <path>Custom sessions.db path
--no-dbSkip SQLite DB, only scan JSON files

Workflow

  1. Start by running the search with the user's criteria to get a list of matching sessions.

  2. If the user wants to see details, use --full-prompt or --transcript.

  3. For transcript inspection, consider --max-messages and --content-types to focus on relevant parts.

  4. For bulk export, use --export <dir> to copy session files.

Session Data Structure

Each session on disk has:

  • <session_id>.json — Metadata: session_id, started_at, status, source, provider, model, cwd, prompt, metadata (mode, systemPrompt, cost, usage), etc.

  • <session_id>.messages.json — Full conversation transcript with messages containing content blocks (text, thinking, tool_use, tool_result, image).

The SQLite sessions.db may contain older sessions with similar fields plus transcript_path, hook_path, parent_session_id, agent_id, is_subagent.

Files

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs Python

Security

What our scanner noticed· Low risk

  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Cline
Publisher
Cline (Official)
Source
cline/skills · skills/cline-session-search · commit 2637846
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Cline or Cline.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download cline-session-history.zip