Current behavior
flow run playbook <slug> always spawns a new terminal tab via cmdDo. There is no flag to bind the current Claude session to the new playbook-run task instead.
$ flow run playbook new-vm --here
flag provided but not defined: -here
Usage of run playbook:
-dangerously-skip-permissions
Exit code 2.
Why this is a gap
Regular tasks have a clear in-session bind path:
flow do <slug> → spawns a new tab.
flow do --here <slug> → binds the current session, no tab spawn.
Playbook runs only have the first form. When the user is in a dispatch session and wants to execute a playbook run in the active conversation (preserving the transcript, avoiding a tab switch), there's no way to do it.
Source
internal/app/run.go:31-116 — cmdRunPlaybook defines only --dangerously-skip-permissions and always delegates to cmdDo(doArgs) with no --here forwarded.
internal/app/do.go:59,75-77 — cmdDo natively supports --here (routes to cmdDoHere), but cmdRunPlaybook never uses that path.
internal/app/run_test.go — no tests cover an in-session bind variant.
Proposed UX
flow run playbook <slug> --here:
- Create the playbook-run task row + snapshot brief as today.
- Instead of
cmdDo(doArgs), call cmdDoHere(runSlug, force).
- Net effect: a
kind=playbook_run task is created, its brief is snapshotted, and the current Claude session is bound to it. Status flips to in-progress. No tab spawns.
Inherits all --here safety invariants
- Refuses if
\$CLAUDE_CODE_SESSION_ID is unset.
- Refuses if this session is already bound to another task (session_id uniqueness;
--force does not override).
- (Done-task refusal is irrelevant — the run is brand-new in
backlog.)
Open questions
- Should
--here accept --force? Probably yes for symmetry, though the only case it can rescue is a rare collision with an existing pre-bound run-task (which can't happen with a freshly-inserted row).
- Should the skill's §4.13 (run a playbook) gain a session-mode question similar to §4.4 (regular
flow do)?
Current behavior
flow run playbook <slug>always spawns a new terminal tab viacmdDo. There is no flag to bind the current Claude session to the new playbook-run task instead.Exit code 2.
Why this is a gap
Regular tasks have a clear in-session bind path:
flow do <slug>→ spawns a new tab.flow do --here <slug>→ binds the current session, no tab spawn.Playbook runs only have the first form. When the user is in a dispatch session and wants to execute a playbook run in the active conversation (preserving the transcript, avoiding a tab switch), there's no way to do it.
Source
internal/app/run.go:31-116—cmdRunPlaybookdefines only--dangerously-skip-permissionsand always delegates tocmdDo(doArgs)with no--hereforwarded.internal/app/do.go:59,75-77—cmdDonatively supports--here(routes tocmdDoHere), butcmdRunPlaybooknever uses that path.internal/app/run_test.go— no tests cover an in-session bind variant.Proposed UX
flow run playbook <slug> --here:cmdDo(doArgs), callcmdDoHere(runSlug, force).kind=playbook_runtask is created, its brief is snapshotted, and the current Claude session is bound to it. Status flips toin-progress. No tab spawns.Inherits all
--heresafety invariants\$CLAUDE_CODE_SESSION_IDis unset.--forcedoes not override).backlog.)Open questions
--hereaccept--force? Probably yes for symmetry, though the only case it can rescue is a rare collision with an existing pre-bound run-task (which can't happen with a freshly-inserted row).flow do)?