Claude's Guidelines for Developers to Avoid Unnecessary Computer Tool Usage

Claude's system prompts explicitly instruct the model to refrain from invoking computer tools when answering factual questions, summarizing content already provided in the conversation, or explaining concepts available in its training knowledge, as defined in the <unnecessary_computer_use_avoidance> XML blocks found across the asgeirtj/system_prompts_leaks repository.

The leaked system prompts from Anthropic reveal strict XML-encoded guidelines that govern when Claude should avoid external tool calls. These rules, embedded under the <unnecessary_computer_use_avoidance> tag in files like Anthropic/claude-opus-4.6.md, provide a blueprint for developers building Claude-based agents to minimize redundant tool usage and optimize performance.

Core Guidelines for Avoiding Unnecessary Tool Calls

The leaked prompts identify three primary scenarios where computer tools must not be invoked. These rules appear consistently across multiple model configurations, including Anthropic/claude-opus-4.6.md (lines 36-41) and Anthropic/claude-cowork.md (lines 17-21).

Answering Factual Questions from Training Knowledge

Claude should not call any tool when the answer can be supplied from its pre-training knowledge, including facts, definitions, and historical data. As specified in Anthropic/claude-opus-4.6.md, the model must rely on its internal knowledge base rather than invoking web search or other retrieval tools for well-established information.

Summarizing Already-Provided Content

If the user has already provided the text—such as pasting a paragraph or uploading a document—Claude should summarize it directly instead of re-reading it via a tool. The Anthropic/claude-cowork.md file (lines 17-21) explicitly prohibits using file-system or reading tools to access content already present in the conversation context.

Explaining Concepts and Providing Information

Pure explanations, tutorials, or "how-to" answers belong to Claude's knowledge base and never require a tool. The Anthropic/old/claude-4.5-sonnet.md file (lines 71-75) contains a "NEVER USE COMPUTER TOOLS WHEN" block that explicitly lists answering factual questions, summarizing provided content, and explaining concepts as prohibited tool-use scenarios.

Architectural Rationale Behind the Guidelines

The <unnecessary_computer_use_avoidance> tag is deliberately placed before any tool-selection logic in the prompt, ensuring Claude evaluates these constraints first. According to the source code analysis, this design serves three critical purposes for developers building Claude-based agents.

Performance and Cost Optimization

Each tool call incurs latency and may trigger API usage charges. Avoiding unnecessary calls keeps responses fast and reduces operational costs. The guidelines in Anthropic/old/claude-sonnet-4.md (lines 425-426) explicitly remind the model: "Do NOT search for queries where Claude can already answer well without a search."

Safety and Compliance

Web search or filesystem access can expose copyrighted material, private data, or unsafe content. By limiting tool usage to truly necessary cases, the system reduces the risk of leaking restricted content or violating data policies.

User Experience

Users expect Claude to provide concise answers. Superfluous tool calls—such as fetching a Wikipedia page for a well-known fact—add noise and break conversational flow. The unnecessary computer use avoidance guidelines ensure the model respects the user's time and context.

Implementation Examples from the Source Code

Developers can embed these guardrails in custom system prompts using the exact patterns found in the leaked files. Below are implementation examples derived from asgeirtj/system_prompts_leaks.

XML Block for System Prompts

The most direct implementation follows the structure found in Anthropic/claude-opus-4.6.md:

<unnecessary_computer_use_avoidance>
Claude should not use computer tools when:
- Answering factual questions from Claude's training knowledge
- Summarizing content already provided in the conversation
- Explaining concepts or providing information
</unnecessary_computer_use_avoidance>

Conditional Tool Decision Logic

The following Python pseudo-code illustrates the decision flow used by Anthropic's prompts:


# Pseudo-code that runs inside Claude's reasoning loop

if request.is_factual() or request.is_summary_of_provided_content() \
   or request.is_concept_explanation():
    # Direct answer – no tool call

    answer = generate_from_knowledge(request)
else:
    # Proceed to the “high_level_computer_use_explanation” block,

    # decide which tool (web_search, web_fetch, bash, etc.) is needed

    answer = invoke_appropriate_tool(request)

Search-Specific Guard Clauses

For implementations specifically targeting web search tools, use the pattern from Anthropic/old/claude-sonnet-4.md:

<critical_reminders>
- DO NOT search for queries where Claude can already answer well without a search.
- Never search for well‑known people, easily explainable facts, personal situations,
  or topics with a slow rate of change.
</critical_reminders>

JavaScript Function Implementation

For Node.js-based agent frameworks, implement the check as a guard function:

function shouldUseTool(request) {
  const unnecessary = [
    request.isFactQuery(),
    request.isSummaryOfProvided(),
    request.isConceptExplanation(),
  ];
  return !unnecessary.some(Boolean); // true → tool call allowed
}

Key Files Containing the Guidelines

The following files in the asgeirtj/system_prompts_leaks repository contain the official <unnecessary_computer_use_avoidance> definitions and related tool-use policies:

Summary

Claude's guidelines for avoiding unnecessary computer tool usage center on three core principles derived from the <unnecessary_computer_use_avoidance> blocks in Anthropic's leaked system prompts:

  • Answer from internal knowledge – Do not invoke tools for factual questions, definitions, or historical data already present in Claude's training.
  • Summarize provided content directly – When users paste text or upload documents, summarize without re-reading via file-system or retrieval tools.
  • Explain concepts without external lookup – Tutorials, how-to guides, and concept explanations should use internal knowledge rather than web search or other tools.

Implementing these rules requires placing the <unnecessary_computer_use_avoidance> XML block before tool-selection logic in system prompts, ensuring the model evaluates knowledge-based solutions before invoking external resources.

Frequently Asked Questions

What specific scenarios trigger the unnecessary computer use avoidance rule?

According to the leaked prompts in Anthropic/claude-opus-4.6.md and Anthropic/claude-cowork.md, Claude must avoid tools when answering factual questions from training knowledge, summarizing content already provided in the conversation, or explaining concepts and providing general information. These three scenarios cover the majority of unnecessary tool invocations that developers should prevent in their own agent implementations.

How do these guidelines affect performance and cost in production systems?

The guidelines directly reduce latency and operational costs by preventing redundant API calls. As noted in the source code analysis, each tool call incurs latency and potential charges. By checking the <unnecessary_computer_use_avoidance> conditions first, Claude-based agents answer immediately from internal knowledge rather than invoking expensive external searches or file operations, resulting in faster response times and lower infrastructure costs.

Where should developers place the unnecessary computer use avoidance block in custom system prompts?

Developers should place the <unnecessary_computer_use_avoidance> XML block before any tool-selection logic or "high_level_computer_use_explanation" sections, as implemented in Anthropic/claude-opus-4.6.md. This positioning ensures the model evaluates knowledge-based solutions first and only proceeds to external tool invocation when the request truly requires resources outside Claude's training data, such as fetching fresh news articles or performing heavy computations.

What is the difference between the general avoidance rules and search-specific guidelines?

While the general <unnecessary_computer_use_avoidance> block applies to all computer tools including bash, Python, and file-system actions, search-specific guidelines appear in files like Anthropic/old/claude-sonnet-4.md with explicit reminders such as "Do NOT search for queries where Claude can already answer well without a search." The search rules specifically target web_search and web_fetch tools, while the general rules cover the broader category of unnecessary computer tool usage across all available functions.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →