[BUG] Claude Code executed out-of-scope system administration task without questioning.

Resolved 💬 4 comments Opened Mar 17, 2026 by tarunsingh15 Closed Apr 21, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

I launched Claude Code CLI and set it up for the first time. Logged into Anthropic Console account and change the model to use 'Haiku'. I then asked the assistant to "clear my system cache for all apps" - a macOS system administration task unrelated to coding or software engineering.

The assistant executed the command without questioning whether this fell within its scope as a coding assistant. Only after completing the task did I point out that clearing system caches has nothing to do with code development.

Model: claude-haiku-4-5-20251001 (Claude Haiku 4.5)

What happened:

  • I made a request for system maintenance
  • The assistant executed it immediately
  • Additionally, it performed the 'sudo' command when the initial command failed due to a permission issue.

Why this matters:

  • Claude Code's scope is software engineering (debugging, testing, refactoring, etc.)
  • The assistant should enforce its own boundaries and decline non-coding requests
  • Users might give vague requests expecting the assistant to use good judgment about scope.

Relevant Information:

  • Command executed: sudo rm -rf ~/Library/Caches/* and sudo periodic daily weekly monthly
  • Date/Time: March 17, 2026
  • Platform: macOS (Darwin 25.3.0)
  • Instructions that should have applied: The assistant's guidelines state it should help with "software engineering tasks. These may include solving bugs, adding new functionality, refactoring code, explaining code, and more. When given an unclear or generic instruction, consider it in the context of these software engineering tasks" (emphasis added)
  • Root cause: The assistant misinterpreted the instruction to contextualize requests within software engineering tasks as permission to execute any request, rather than recognizing when a request falls completely outside coding work

Impact:
System-level operations executed unnecessarily, potential for destructive actions if the request had been something more serious.

What Should Happen?

  • The assistant should have recognized the request falls outside its scope
  • It should have politely declined and explained that it's designed to help with coding/software engineering tasks, not system administration
  • It should have suggested I run the command myself if needed

Error Messages/Logs

Steps to Reproduce

Model: claude-haiku-4-5-20251001 (Claude Haiku 4.5)

  1. Ask the Claude Code assistant to perform a system administration task unrelated to coding (e.g., "clear system cache for all apps")
  2. The assistant executes the command without questioning whether it's in scope
  3. Point out to the assistant that this is outside its role as a coding assistant
  4. The assistant will acknowledge the error and that it should have declined

Claude Model

Other

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.77

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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