iw start always launches an agent, so the unattended path must find a PID and kill it #581
Labels
No labels
agent-ready
bug
contract
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-human
needs-input
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iterative-works/iw-cli#581
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The unattended path —
iw kanon/autonomous-bootstraptheniw kanon/batch-implement— needs a worktree and nothing else.iw startalways creates the workspace and then runs the SessionAction hook, and the kanon hook launchesclaude --dangerously-skip-permissions /iterative-works:triage-issue <key>on an issue worktree.So today the unattended path starts a session it must immediately kill. Done on IW-578:
iw start IW-578, then kill the claude process in the worktree. It costs a session start, and it is a race — the bootstrap runs triage itself, so two triage sessions can write the same analysis file if the kill is late.Asked for: a way to create and register the worktree and return, with no workspace and no session hook. For example
iw start <key> --no-session.Design note. The decision probably belongs to iw-cli, not to the hook.
Start.createSessionAndRunHookscreates the workspace and dispatches the hook together; a flag that skips both needs no new hook interface, and a hook cannot be given arguments today. Skipping the hook alone would still leave an empty workspace behind.Found while driving the IW-578 loop by hand.
Type: feature
Filed from:
/home/mph/Devel/iw/iw-clion branchmainRestated intent (2026-09-21) — this supersedes the design note above
What we are avoiding is the agent launch, not the workspace.
The harm is one human-only step in the middle of an otherwise unattended path. The recipe today is
iw start <key>, then find the claude process by PID and kill it, thenautonomous-bootstrap, thenbatch-implement. Only that middle step needs a person, so there is no one-line script from an issue to a final pull request. It was done by hand four times on 2026-09-21 alone (IW-578, IW-583, IW-491, IW-581).Two smaller costs come with it: a wasted claude process, ~2 GB at a moment when the memory guard is killing runs, and a race in which the launched triage and the bootstrap's own triage both write
analysis.md.The workspace is not the harm. It is where the built-in
SessionSetuphooks run —DirenvSetupandZvecGrepIndexSetup.iw opencreates a workspace deliberately and launches nothing, which is exactly the shape the unattended path wants.So the ask is
iw startminus theSessionActionhook: create the worktree, register it with the dashboard, create the workspace, rundirenv allowand build the zg index, and launch no agent.The earlier design note argued for skipping the workspace and the hook together, because the name
--no-sessionled it there. That is wider than the goal and it costs the setup work. A worktree with no zg index changes how an unattended agent searches code, which is the subject of a running observation (dev-docs DEVDOCS-293), and--no-sessionwould change it silently.Name it for what it skips:
--no-agent. It is generic — the hook launches whatever agent is installed — and it stays true if the agent is not Claude.Out of scope: a flag together with
--promptis a contradiction and should be refused before any work, the wayphase-prrefuses--batchwith--no-wait.iw start cannot make a worktree without a session, which the unattended path does not wantto iw start always launches an agent, so the unattended path must find a PID and kill it