Skip to content

fix(ci): disallow interactive-only tools in headless tag and agent runs#1465

Open
syf2211 wants to merge 1 commit into
anthropics:mainfrom
syf2211:fix/headless-disallow-interactive-tools-1462
Open

fix(ci): disallow interactive-only tools in headless tag and agent runs#1465
syf2211 wants to merge 1 commit into
anthropics:mainfrom
syf2211:fix/headless-disallow-interactive-tools-1462

Conversation

@syf2211

@syf2211 syf2211 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Disables interactive-only Claude Code tools in headless tag and agent mode runs so CI workflows cannot end a turn while waiting for background work that will never resume.

Motivation

Fixes #1462. In headless CI, the model could call ScheduleWakeup, SendMessage, Monitor, or TaskList, spawn background work, end its turn with a “waiting…” message, and still report success — producing silent no-op runs.

Changes

  • Extend default headless disallowed tools: ScheduleWakeup, SendMessage, Monitor, TaskList (alongside existing WebSearch/WebFetch)
  • Wire buildDisallowedToolsString() into tag and agent mode claudeArgs via --disallowedTools
  • Respect --allowedTools overrides when building the default disallowed list

Tests

  • bun test — 769 pass
  • bun run typecheck — pass

Notes

  • Background Agent subagents are not globally disabled (too blunt); this PR blocks the resume/wait tooling that makes the failure silent.
  • Users can still add more tools via claude_args --disallowedTools; defaults are union-merged in parse-sdk-options.

Fixes #1462

Block ScheduleWakeup, SendMessage, Monitor, and TaskList by default in
tag and agent mode claudeArgs so headless CI runs cannot end a turn while
waiting for background work that will never resume.

Fixes anthropics#1462
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Headless run reports success after agent backgrounds work and ends turn (ScheduleWakeup/background subagents unusable in CI)

1 participant