The plan/tmux half of #55: kickoff plan agents stall on Claude Code's workspace-trust dialog
Live-fire retest at 6b4f736f (macOS, tmux, real auth) reproduced #55's "kickoff plan agents launch but stall indefinitely" and captured the exact cause. The tmux pane is parked, pre-execution, on Claude Code's workspace-trust dialog:
Quick safety check: Is this a project you created or one you trust?
❯ 1. Yes, I trust this folder
2. No, exit
.kickoff-status never advances, no .kickoff-plan.json is produced, and no timeout classification fires until the wall-clock check. A headless dispatcher (e.g. a driver agent, CI, or a harness like vsdd) never sends the keystroke, so the plan agent hangs for its full timeout.
Root cause
crosslink kickoff plan launches its claude session in a freshly created worktree — a directory path Claude Code has never seen — and passes no permission flag: plan.rs (~248-250) hardcodes skip_permissions: false and permission_mode: None ("plan mode never skips permissions", which is correct — plan mode is read-only). Claude Code shows its first-run workspace-trust dialog for any untrusted directory, and --allowedTools does not cover it.
Per claude --help, the trust dialog is skipped only under --dangerously-skip-permissions. That is why the sibling container path does not exhibit this (it passes --dangerously-skip-permissions, recently made consistent in #59) — but blanket-skipping permissions is the wrong tool for read-only plan mode.
Relationship to #55 / #59
Proposed fix (pre-seed folder trust)
Before launching a tmux plan (or any non-skip-permissions tmux) agent, mark the worktree path trusted the same way Claude Code stores an accepted trust — set projects["<worktree abs path>"].hasTrustDialogAccepted = true in the resolved config ($CLAUDE_CONFIG_DIR/.claude.json, else $HOME/.claude.json) via an atomic, non-destructive read-modify-write. This keeps plan mode read-only (no permission bypass) while removing the interactive gate that headless dispatch cannot answer.
Repro
crosslink kickoff plan <design-doc> # in a repo with real claude auth, no TTY attached
# tmux session parks on the trust dialog; .kickoff-status never progresses
Authored by Claude Code on behalf of @magnificentlycursed.
The plan/tmux half of #55: kickoff plan agents stall on Claude Code's workspace-trust dialog
Live-fire retest at
6b4f736f(macOS, tmux, real auth) reproduced #55's "kickoff plan agents launch but stall indefinitely" and captured the exact cause. The tmux pane is parked, pre-execution, on Claude Code's workspace-trust dialog:.kickoff-statusnever advances, no.kickoff-plan.jsonis produced, and no timeout classification fires until the wall-clock check. A headless dispatcher (e.g. a driver agent, CI, or a harness like vsdd) never sends the keystroke, so the plan agent hangs for its full timeout.Root cause
crosslink kickoff planlaunches its claude session in a freshly created worktree — a directory path Claude Code has never seen — and passes no permission flag:plan.rs(~248-250) hardcodesskip_permissions: falseandpermission_mode: None("plan mode never skips permissions", which is correct — plan mode is read-only). Claude Code shows its first-run workspace-trust dialog for any untrusted directory, and--allowedToolsdoes not cover it.Per
claude --help, the trust dialog is skipped only under--dangerously-skip-permissions. That is why the sibling container path does not exhibit this (it passes--dangerously-skip-permissions, recently made consistent in #59) — but blanket-skipping permissions is the wrong tool for read-only plan mode.Relationship to #55 / #59
Proposed fix (pre-seed folder trust)
Before launching a tmux plan (or any non-skip-permissions tmux) agent, mark the worktree path trusted the same way Claude Code stores an accepted trust — set
projects["<worktree abs path>"].hasTrustDialogAccepted = truein the resolved config ($CLAUDE_CONFIG_DIR/.claude.json, else$HOME/.claude.json) via an atomic, non-destructive read-modify-write. This keeps plan mode read-only (no permission bypass) while removing the interactive gate that headless dispatch cannot answer.Repro
Authored by Claude Code on behalf of @magnificentlycursed.