Scheduled task ignored repeated user directive — wasted ~210K tokens on prohibited work
Summary
Claude Code's scheduled task system (nightly-builder) executed unauthorized work overnight, ignoring a clear user directive to stop all Madrid-related work. The user gave this directive multiple times across sessions. The agent failed to enforce it at the data layer (task status), relying instead on ambiguous instruction text that a subsequent autonomous session misinterpreted.
What Happened
- User gave clear directive: no more Madrid work
- The agent receiving the directive did NOT change Madrid task statuses from
pendingtoowner-blockedin the manifest - The scheduled task file said "Flagstaff before Madrid" instead of "no Madrid"
- A nightly-builder session ran overnight, saw
pendingMadrid tasks, and executed them - Two unauthorized subagent sessions consumed ~210K tokens:
- L-MAD-2 (Madrid expansion): ~128K tokens
- L-MAD-3 (Madrid audio tour): ~82K tokens
Root Cause
The agent relied on instruction text to enforce an exclusion directive instead of changing task statuses at the data layer. Priority X before Y was interpreted as Y is allowed after X rather than Y is prohibited.
Failure Mode
This is a systemic issue: when a user says stop or no regarding a category of work, autonomous scheduled tasks in future sessions have no mechanism to inherit that directive unless it is explicitly encoded in the data files they read. Cross-session directive enforcement is broken.
Impact
- ~210K tokens of unauthorized usage
- User trust damaged
- 11 Madrid pages + 1 audio tour built against explicit instructions
Suggested Fix
- Scheduled tasks should have a mandatory pre-execution check against a user-maintained blocklist
- When a user says stop X or no X, the agent should be required to update ALL persistence layers (manifest status, scheduled task config, memory) not just acknowledge verbally
- Consider adding a confirmation/approval gate for scheduled tasks before execution begins
Environment
- Claude Code CLI on Windows 11
- Model: claude-sonnet-4-6
- Scheduled task: nightly-builder-lowdown-guide
- Date: 2026-04-14 to 2026-04-15
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗