Skip to content

Concepts

Subagents, forks and worktrees

What Wisdom records when a session starts helpers, splits in two, or works in another folder.

One agent session is one record. This page covers what happens when the work doesn’t stay in one straight line.

A subagent belongs to the session that started it. A glance counts them, the call that started one points to it (→ a1), and open reads it like a turn:

Terminal
wisdom open a1 --capture latest # its task, calls, changes and report
wisdom open a1/c2 --capture latest # one of its calls, whole

In Usage’s Dev view, a subagent is nested under the call that started it. Claude Code’s internal helpers (prompt suggestions, recaps) are recorded too, but folded out of that tree.

Its calls, their results and its file changes are recorded as they happen. Its report, transcript and tokens arrive only when the agent says the subagent stopped.

Two terminals, or a background /fork, are two records, both recording. If they work in the same folder, each sees the other’s file changes. Wisdom labels them honestly: a change it saw while no tool of that session ran is external-or-unknown.

When you read a commit, each piece goes to the session whose own tool call named the file or held its text. When none did, every session that saw it is listed.

What you do How it’s recorded
Resume a session The same record continues. The time between is a gap.
/clear, /new A new session. The old one isn’t linked to it.
/fork, /branch A separate session, with no link to its parent yet.
wisdom clone A new session, linked as cloned from. See Clone a session.
wisdom handoff Linked as continues or continued after. See Hand off work.
Claude Code /rewind The same session, with no marker.
Pi /tree The same session, with no marker.
Compaction (Codex) The same session; the event is kept.
A finished background command wakes Claude Code A turn, shown as in (harness notice), not as something you asked.

A session started in a linked worktree belongs to the main project. Each session watches its project and any worktree it works in, and shows those changes with the worktree’s name and branch: in worktree bp3 (branch x). Paths are then relative to that worktree.

  • The baseline is taken when the session first works there, so checking a worktree out isn’t recorded as changes. A worktree-entered gap marks what came before.
  • Files changing in a worktree the session never worked in get one other-worktree gap and no diffs.
  • Work in a folder outside the one being watched is marked outside-watched-folder.
  • When Claude Code moves a session’s file on entering a worktree, Wisdom’s copy follows it.

Connected Codex is the exception: it ignores a project’s hooks inside a worktree. Use wisdom track codex there.

A record closes when the agent ends the session, or after 10 minutes with no event and no tool running (recording.idleMinutes). Its next event continues it. If the background service restarts mid-session, the record is interrupted, and the next event continues it with a gap, since the files’ baseline was only in memory.