[BUG] Agents are written with language opposite than the main prompt's intent

Resolved 💬 2 comments Opened May 22, 2026 by imbef Closed May 26, 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?

Every time main Claude Code asks an agent to do something, CC rewrites the intention, misrepresenting the intention to the Agent. Since agents are usually dispatched to do long, repetitive tasks, the result is hours of wasted work since CC doesn't ask or check if the agent task corresponds to the intent prompted, regardless of how CC evaluates if the order is ambiguous

In the present example, it was a simple ask: propose a draft. CC interpreted the rule differently. In CC's own words "The failure mode: when I spawn an agent with "draft a rule file," I framed the agent's task as "write this file" instead of "return the content as text."
The agent wrote to disk. I reported completion. At no point did I pause between "agent returned" and "tell user it's done."

<img width="1563" height="537" alt="Image" src="https://github.com/user-attachments/assets/8ca6c7a3-e6cb-4b02-bd73-49fb00d9a196" />

What Should Happen?

CC should only dispatch agents to do what matches user intent. Failure to do that causes an issue where rules are required to enforce basic pragmatics (the linguistic concept).

Error Messages/Logs

See screenshot

Steps to Reproduce

This bug happens in many different contexts in which you set up rules and state intentions that agents don't follow. In the present case, I was trying to fix the same issue (mismatched intentions and agent actions), by establishing rules. Claude proposed I dispatch an agent to read the internal procedures. I did so by asking 'ok, propose me a draft'. The agent responded by crafting and implemented an .md with wrong rules about what it read in the procedural pages. The screenshot reflects the model's own rationale about how model <=> agent interaction happen. This is not model behavior, this is bug.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.145.267

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

<img width="1551" height="655" alt="Image" src="https://github.com/user-attachments/assets/77a1c23c-e850-4e34-8030-dfc7d9b666ef" />

View original on GitHub ↗

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