Skip to main content
Watchfire
Commands
Main content

watchfire session

watchfire session starts, lists, attaches to, stops, resumes and finishes agent sessions that run side by side in a project — introduced in Hearth (v11.0.0).

Run and manage several agent sessions side by side.

Usage

watchfire session <subcommand>

A session you start here runs next to whatever else the project is doing, and waits for you to decide what happens to its branch when you are done. Tasks from the queue that finish with the ask finish action show up in the same list and are finished the same way.

watchfire session new "fix the flaky login test"
watchfire session list
watchfire session attach 2
watchfire session finish 7 --pr

Session commands need a v11 daemon. Against an older one they refuse to run and say how to restart it.

Subcommands

session new

Start a session and attach the terminal to it.

watchfire session new [prompt]

By default the session gets its own worktree and branch. With --main it works in the project's own checkout instead: no branch, and nothing to finish.

FlagDescription
--mainWork in the project's own checkout instead of a new worktree.
--from <ref>Branch (or any ref) the session's new branch starts from. Default: the project's base ref, else the current HEAD.
--resume <log-id>Continue the conversation of a past session, by log ID (see watchfire logs). It runs where that session ran.
--title <title>Session title. Default: the first line of the prompt.
--agent <backend>Agent backend for this session. Default: the project's.
--finish <action>Finish action to apply when the session ends. Default: ask.
--detachStart the session without attaching the terminal.
--sandbox <backend>Sandbox backend: auto, seatbelt, landlock, bwrap, none.
--no-sandboxDisable sandboxing for this session.

session list

List running sessions and work waiting for a finish action.

watchfire session list

Alias: session ls. Add --all to list the sessions of every project.

session attach

Attach the terminal to a running session, by slot, session ID or task number.

watchfire session attach <slot|session-id|task-number>

Ctrl+] detaches without stopping the session.

session stop

Stop a session's agent. Its worktree and branch are kept.

watchfire session stop <slot|session-id|task-number>

session resume

Restart the agent of a stopped session in the same worktree.

watchfire session resume <task-number>

Add --detach to resume without attaching the terminal.

session finish

Decide what happens to a session's work.

watchfire session finish <task-number> --pr
FlagWhat happens
--prCommit, push and open a pull request.
--pushCommit and push the branch.
--mergeMerge into the checked-out branch.
--keep-branchRemove the worktree, keep the branch.
--keep-worktreeLeave branch and worktree in place.
--discardDelete the branch and the worktree. Asks for confirmation; --yes skips it.
--action <name>Give the finish action by name instead of one of the flags above.

If the session's agent is still running, it is stopped first. See finish actions for what each one leaves behind.

On this page