Summary
In an issues: labeled-triggered workflow using claude-code-action@v1 with an explicit prompt (agent mode), the agent delegated repo exploration to a background subagent (Agent tool with background execution), then called ScheduleWakeup several times and ended its turn with:
"Waiting for the Explore agent to finish; I'll pick this back up automatically when it completes or the scheduled wakeup fires."
In a headless run the process exits when the turn ends, so the background subagent was killed, nothing was accomplished (no comment, no PR) — and the action step concluded success because the final message wasn't an error.
Why this is a footgun
- Interactive-session tools (
ScheduleWakeup, SendMessage, background subagent execution, Monitor, TaskList) appear to be exposed to the model in headless CI runs, where "end turn and resume later" is impossible.
- The model uses them in good faith and exits early; the run is reported green, so the failure is silent — you only notice because the expected side effects (comment/PR) never appear.
Environment
anthropics/claude-code-action@v1, self-hosted Linux runner (docker myoung34/github-runner:ubuntu-noble)
- Auth:
claude_code_oauth_token (subscription)
- Model per init log:
claude-sonnet-5
- Trigger:
issues: [labeled] with an explicit prompt input; claude_args: --max-turns 50 --allowedTools "Bash(gh:*),Bash(git:*),..."
Session log excerpt (tool calls, from the runner's session .jsonl)
CALL Skill
CALL Bash: gh issue view 1959 --json title,body,comments,labels,state,author
CALL Read: .claude/skills/sprinkles-dev/references/pr.md
CALL Agent <- Explore subagent, launched in background
CALL Bash: git status && git ...
CALL ScheduleWakeup
CALL ToolSearch
CALL TaskList
CALL ScheduleWakeup
CALL SendMessage <- InputValidationError (missing `message`)
CALL ScheduleWakeup
CALL ScheduleWakeup
CALL Bash: sleep 1; echo waiting
LAST ASSISTANT TEXT: "Waiting for the Explore agent to finish; I'll pick this
back up automatically when it completes or the scheduled wakeup fires."
Result JSON: "subtype": "success"-adjacent — the step passed; num_turns well under the limit; no error surfaced.
Workaround
We now pass --disallowedTools "ScheduleWakeup,SendMessage,Monitor" and added prompt text telling the agent the run is headless and it must work synchronously and not end its turn until its deliverable exists. That works, but every action user is one helpful-model-decision away from silent no-op runs.
Suggested fixes (any of)
- Don't expose interactive-only tools (ScheduleWakeup/SendMessage/background agent mode) in headless (
-p) runs, or make background subagent completion block process exit.
- Have the action fail (or at least warn) when the session ends with pending background tasks / scheduled wakeups.
- Document the
--disallowedTools workaround for CI use.
Happy to provide fuller (redacted) session logs if useful. Repo is private, so run links wouldn't be viewable — excerpts above are from the persisted session file on our runner.
Summary
In an
issues: labeled-triggered workflow usingclaude-code-action@v1with an explicitprompt(agent mode), the agent delegated repo exploration to a background subagent (Agenttool with background execution), then calledScheduleWakeupseveral times and ended its turn with:In a headless run the process exits when the turn ends, so the background subagent was killed, nothing was accomplished (no comment, no PR) — and the action step concluded
successbecause the final message wasn't an error.Why this is a footgun
ScheduleWakeup,SendMessage, background subagent execution,Monitor,TaskList) appear to be exposed to the model in headless CI runs, where "end turn and resume later" is impossible.Environment
anthropics/claude-code-action@v1, self-hosted Linux runner (dockermyoung34/github-runner:ubuntu-noble)claude_code_oauth_token(subscription)claude-sonnet-5issues: [labeled]with an explicitpromptinput;claude_args: --max-turns 50 --allowedTools "Bash(gh:*),Bash(git:*),..."Session log excerpt (tool calls, from the runner's session .jsonl)
Result JSON:
"subtype": "success"-adjacent — the step passed;num_turnswell under the limit; no error surfaced.Workaround
We now pass
--disallowedTools "ScheduleWakeup,SendMessage,Monitor"and added prompt text telling the agent the run is headless and it must work synchronously and not end its turn until its deliverable exists. That works, but every action user is one helpful-model-decision away from silent no-op runs.Suggested fixes (any of)
-p) runs, or make background subagent completion block process exit.--disallowedToolsworkaround for CI use.Happy to provide fuller (redacted) session logs if useful. Repo is private, so run links wouldn't be viewable — excerpts above are from the persisted session file on our runner.