Skip to content

Troubleshooting

nathan nelson edited this page Apr 23, 2026 · 2 revisions

Troubleshooting

First step for any issue: run longhand doctor. It reports database, hook, MCP, and index health in one shot.

Ingest

"No sessions found"

Ingest is slow on first run

Ingest crashes midway


Hooks

SessionEnd hook didn't fire

UserPromptSubmit hook injecting too much / too little


MCP

Claude doesn't see Longhand's tools

MCP server crashes on startup


Recall

recall returns nothing

recall_project_status says "No session history" but you remember working on the project

Run longhand reconcile to check for drift between ~/.claude/projects/ and the sessions table. Two common causes:

  • SessionEnd hook didn't fire — the transcript is on disk but was never ingested (hook failure, Claude Code exit path that skipped hooks, transcript predates longhand hook install).
  • Project inference attributed to $HOME — sessions launched from your home directory with $HOME as the first-event cwd got project_id = NULL on pre-0.6.0 ingest. Fixed at ingest time in v0.6.0 for new sessions.

Both are resolved by longhand reconcile --fix. The reconciler is idempotent — the already_ingested check plus upsert_session mean you can re-run safely.

As of v0.6.0, recall_project_status also surfaces a stale: true flag with a stale_reason string whenever it detects on-disk transcripts not ingested for the queried project. If an agent sees that flag and silently falls back to reading raw JSONLs, the recall skill is out of date — refresh ~/.claude/skills/recall/SKILL.md from the repo.

First recall is slow, subsequent are fast

Project matching returns the wrong project


Storage

Database file is huge

Embedding index seems stale


Still stuck

Open an issue at github.com/Wynelson94/longhand/issues with the output of longhand doctor and whatever command you ran. Include your OS, Python version, and Claude Code version.