-
Notifications
You must be signed in to change notification settings - Fork 1
Description
What happened
The --on-create hook has a hardcoded 60s timeout. For monorepos like UsableMachines/mono, yarn install in a fresh worktree can easily exceed 60s, causing the hook to time out.
Additionally, if the hook fails, the agent still launches into a potentially broken worktree (no node_modules, missing deps). This means the agent wastes its entire session trying to figure out why nothing works.
Current behavior
--on-createruns in Phase 1, before agent launch (Phase 2) — ✅ correct sequencing- Runs with cwd set to the worktree path — ✅ correct
- 60s timeout — ❌ too short for
yarn installin large monorepos - Hook failure doesn't abort launch — ❌ agent launches into broken state
Proposed fix
- Make timeout configurable:
--on-create-timeout <seconds>flag (default 60s for backward compat, but allow 300s+) - Add
--on-create-must-succeedflag (or make it default): if the hook exits non-zero, abort the launch instead of continuing - Consider a config-level default in daemon config so users don't have to pass the flag every time
Use case
agentctl launch claude-code \
--worktree ~/code/mono \
--branch charlie/feature \
--on-create "bash scripts/worktree-setup.sh" \
--on-create-timeout 300 \
-p "task"Where scripts/worktree-setup.sh runs yarn install, env setup, etc.
Environment
- agentctl: latest (npm linked)
- Mono repo yarn install: 60-180s depending on cache state
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels