Skip to content
Skills Library
AI & agents · Analysis

deepagents-thread-inspector

/deepagents-thread-inspector

Inspect and explain conversations in the local Deep Agents Code SQLite session store. Use to look up the current thread's title or name, as a fallback when LangSmith trace tooling is unavailable, for offline or untraced sessions, or when asked to identify or summarize a local dcode thread, inspect checkpoint metadata, list recent local threads, or parse $DEEPAGENTS_HOME/.state/sessions.db and a thread UUID or prefix.

Repository
deepagents ↗
Licence
MIT
Last repository change
25.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
1
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 25.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 1 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/inspect_sessions.py

What it does and when to use it

Inspect and explain conversations in the local Deep Agents Code SQLite session store. Use to look up the current thread's title or name, as a fallback when LangSmith trace tooling is unavailable, for offline or untraced sessions, or when asked to identify or summarize a local dcode thread, inspect checkpoint metadata, list recent local threads, or parse $DEEPAGENTS_HOME/.state/sessions.db and a thread UUID or prefix.

Original author description

Inspect and explain conversations in the local Deep Agents Code SQLite session store. Use to look up the current thread's title or name, as a fallback when LangSmith trace tooling is unavailable, for offline or untraced sessions, or when asked to identify or summarize a local dcode thread, inspect checkpoint metadata, list recent local threads, or parse $DEEPAGENTS_HOME/.state/sessions.db and a thread UUID or prefix.

How it works

  1. Look up the current thread's title
  2. Inspect local state
  3. Explain the result
  4. Safety
Original SKILL.md headings · 49 lines, 461 words
SKILL.md preview
---
name: deepagents-thread-inspector
description: Inspect and explain conversations in the local Deep Agents Code SQLite session store. Use to look up the current thread's title or name, as a fallback when LangSmith trace tooling is unavailable, for offline or untraced sessions, or when asked to identify or summarize a local dcode thread, inspect checkpoint metadata, list recent local threads, or parse $DEEPAGENTS_HOME/.state/sessions.db and a thread UUID or prefix.
license: MIT
compatibility: designed for deepagents-code
---

# Deep Agents Thread Inspector

For conversation inspection, prefer LangSmith tooling when available for a traced thread. For saved thread titles, use the local store. Use `scripts/inspect_sessions.py` instead of manually decoding database blobs. It opens the database read-only and deserializes the root message channel with LangGraph's strict MsgPack loader — reading the materialized messages from the latest checkpoint, or replaying writes in checkpoint order when that fast path is unavailable — and emits JSON.

## Look up the current thread's title

Call `get_current_thread_id` to identify this conversation, then run the script with that ID and `--mode summary` as shown below. Read `thread.thread_name`: it contains the saved title, including manual renames, with a fallback to the latest root checkpoint's name for older stores. If it is `null`, report that the thread has no saved title. If the current ID is unavailable, ask for it; do not infer the current thread from the most recent entry in the thread list.

## Inspect local state

Resolve `SKILL_DIR` to the directory containing this `SKILL.md`; do not assume a user, project, or installation-specific location. Start with the smallest useful view:

```bash
python3 "$SKILL_DIR/scripts/inspect_sessions.py" THREAD_ID --mode latest-turn
```

A unique thread-ID prefix is accepted. Select another view when needed:

```bash
python3 "$SKILL_DIR/scripts/inspect_sessions.py" THREAD_ID --mode summary
python3 "$SKILL_DIR/scripts/inspect_sessions.py" THREAD_ID --mode transcript
```

Use `--include-metadata` only when run, repository, model, checkpoint, or LangGraph metadata matters. Use `--max-content N` to raise or lower the default 4,000-character limit per message, tool result, or tool-call argument.

If the user does not know the ID, list recent threads first:

```bash
python3 "$SKILL_DIR/scripts/inspect_sessions.py" --list 20
```

Pass `--db PATH` only for a non-default session store. The default is `$DEEPAGENTS_HOME/.state/sessions.db`, or `~/.deepagents/.state/sessions.db` when that variable is unset. `DEEPAGENTS_SESSIONS_DB` overrides both. The script applies the same rules dcode does, so a relative or `~user` value is rejected rather than resolved to a database dcode never writes.

## Explain the result

Synthesize the JSON rather than pasting it verbatim.

- State the user's request, the assistant's conclusion, and significant tool actions or failures.
- Distinguish stored facts from your interpretation.
- For the latest turn, describe only the final user message and subsequent activity unless earlier context is required to make it understandable.
- Mention truncation when a relevant record has `content_truncated` or `args_truncated` set.
- Surface reconstruction problems when the result includes a top-level `warnings` array (for example, a corrupt checkpoint, a skipped write, or malformed metadata) so conclusions are appropriately hedged.
- Do not expose unrelated credentials, tokens, personal data, or hidden reasoning that may appear in local records.

## Safety

Keep inspection read-only. Do not deserialize an untrusted database: checkpoint deserialization is intended for trusted local Deep Agents state. Do not mutate or delete session rows unless the user separately and explicitly requests it.
Files in this package (2)
  • SKILL.md 4 KB
  • scripts/inspect_sessions.py 24 KB

Versions

The database has no other skills named deepagents-thread-inspector.

Database snapshot: 13.11.2026 · package version b28c2c860ce3 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100new-dcode-agent
    Scaffold a new Deep Agents (LangChain) agent, a dcode CLI agent, or both, from one command. Use ONLY when the user explicitly runs /new-dcode-agent; never auto-trigger. It interviews the user (form, name, purpose, tools, model, safety), shows a spec, and on confirmation writes a…
  • 96gsd-thread
    Use when work spans sessions and does not belong to any specific phase, or when the user wants to create, list or resume a context thread. Keeps lightweight threads under .planning/threads/.
  • 86deep
    Load the Deep Agents reference before planning, writing, reviewing, testing or debugging anything that uses deepagents, create_deep_agent, LangChain agents, LangGraph (checkpointers, stores, threads, interrupts, streaming), backends, subagents, agent memory, skills or…
  • 100deepagents-architecture
    Guides architectural decisions for Deep Agents applications. Use when deciding between Deep Agents vs alternatives, choosing backend strategies, designing subagent systems, or selecting middleware approaches.
  • 100deepagents-implementation
    Implements agents using Deep Agents. Use when building agents with create_deep_agent, configuring backends, defining subagents, adding middleware, or setting up human-in-the-loop workflows.
  • 100opencode-session-db
    Read OpenCode sessions, messages, and tool outputs directly from the SQLite database at ~/.local/share/opencode/. Use when asked to "read opencode sessions", "query opencode db", "find old sessions", "search session history", "read message history", "export session", "inspect…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.