Feature request: non-interactive/headless mode for skills (CLAUDE_NONINTERACTIVE)

Resolved 💬 2 comments Opened Apr 2, 2026 by n43-ryan Closed May 11, 2026

Problem

Skills that present interactive confirmation prompts (e.g. /handoff) block indefinitely when executed by autonomous agent sessions. There is currently no standard mechanism for a skill to detect it is running in a non-interactive context and skip confirmation.

Context

In autonomous agent deployments (e.g. Gas Town), Claude Code sessions run as witnesses, polecats, refineries, and deacons — fully autonomous, no human at the terminal. When these agents execute /handoff to cycle context, the skill asks:

"Ready to hand off? This will restart the session. (y/N)"

The agent blocks forever. A watchdog must force-kill and restart it. This is a recurring operational problem.

Proposed solution

Add a standard environment variable (e.g. CLAUDE_NONINTERACTIVE=1) that skills can check to skip interactive confirmation prompts:

<!-- in handoff.md skill body -->
1. Check if running non-interactively:
   - If CLAUDE_NONINTERACTIVE=1 or CI=true: skip confirmation, proceed directly
   - Otherwise: ask user "Ready to hand off? (y/N)"

Alternatively, a --yes / -y flag passed to skill invocations.

Current workarounds

  • Gastown-specific: check $GT_ROLE env var set by the harness; if role is not a crew/mayor session, skip confirmation (merged in gastownhall/gastown#3508)
  • Watchdog (deacon) force-kills agents stuck at confirmation prompts after timeout

Impact

Any autonomous deployment of Claude Code agents using the /handoff skill (or other confirmation-gating skills) is affected. The workaround requires per-deployment patches to skill files.

🤖 Generated with Claude Code

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗