Requirements

  • Node.js 24 or later
  • At least one harness to launch threads in: Pi (pi), Claude Code (claude) or Codex (codex) on your PATH

Install

npm install -g @techsavvyash/dough-cli   # the dough CLI (`dough thread`) and the visualiser

To use it from code, add @techsavvyash/threads to your project instead. See library.

Your first thread

Threads from every project are stored in one log, ~/.threads/log.jsonl, so nothing is written into your repositories. Override this with --store <file> or $THREADS_STORE.

  1. Import a conversation as a root thread. Give import a transcript path or a session id; it searches the harness’s session folders for the id.

    dough thread import pi ~/.pi/agent/sessions/<project>/<file>.jsonl
    dough thread import claude 3f1c…          # a Claude Code session id
    dough thread import codex 019a…           # a Codex session id

    Re-running import adds only the new messages.

  2. Find the point to cut from. show numbers the thread’s events. Those #n numbers are what --at and --select use.

    dough thread show t-abc        # any unique prefix of a thread id works
  3. Preview the cut. Without --yes, nothing is saved.

    dough thread cut t-abc --task "Implement the store from the agreed design" \
      --intent handoff --at '#42' --select '#12,#40-#42'

    The preview is the exact first prompt the new thread will receive, followed by a one-line summary: the child id, the cutoff, the number of excerpts and estimated tokens.

  4. Commit it by running the same command with --yes. Committing is idempotent: the same inputs always produce the same child id, so re-running never creates a duplicate.

  5. Launch it in a fresh native session:

    dough thread launch t-1cc6636e84 --harness claude

    The child’s transcript is captured back into the store. Run dough thread sync <thread> later to pull in newer messages.

  6. See the forest:

    dough thread tree
    dough thread view --open       # the web visualiser on http://127.0.0.1:4747

Inside an agent

You don’t need the CLI to cut threads. Install one of the plugins and either ask the agent (“hand off the store implementation to a new thread”) or run the wizard yourself:

Both write to the same store as the CLI and the visualiser.