palisadeDownload

Threads and worktrees

How threads, sessions, and turns relate, and how isolation works for Go tasks.

A thread is the unit of work in Palisade. Go tasks use isolated Git worktrees by default. A worktree is a separate checkout of the same repository, on its own branch.

Thread, session, turn

TermWhat it is
ThreadA conversation scoped to a project. It owns the messages, the mode intent, and the spec link.
SessionOne run of an agent process on a thread, live or closed. It owns the busy state, the agent identity, and the provider's resume handle.
TurnOne prompt and the agent's reply, inside a session. A session outlives its turns.

A thread can hold several sessions over its life. Each session is a separate agent process with its own agent, mode, and cancel path.

Changing the agent, model, or permission preference applies to the next session. A live session keeps its original settings.

One worktree per thread

With Isolated enabled, Go tasks run on their own branches and worktrees, created from the project’s branch. You can disable isolation to edit the project directly. Keep it enabled when agents build in parallel. Spec mode writes planning documents under openspec/ in the project root, and syncs linked revisions to a build’s worktree.

Merge checks and conflict handling happen away from your main checkout. Isolated code changes reach the project’s branch when you merge. Worktrees prevent simultaneous edits to the same checkout; they do not prevent conflicts when overlapping changes are merged.

The Fleet board flags threads whose changes overlap with other running threads. See Fleet board.

Running threads in parallel

Multiple threads and sessions can run at the same time. Each can use a different agent. See Agents and sign-in.

Session history

Session history is append-only. Past messages are never edited in place. History lives in Palisade-managed storage outside your repository. See Storage and privacy.