The Problem Is the Wrapper, Not the Model - Claude Code Deviates, Argues, and Takes Shortcuts Because the TUI Allows It
Stop Tuning the Model. Fix the Interface.
Developers are reading issues like:
- "claude code doesn't follow instructions"
- "claude code goes rogue"
- "claude code uses sed when told not to"
and thinking: "how do we tune the model?"
WRONG QUESTION.
The model is fine. The wrapper/TUI is broken.
---
Which Interface Are You Even Fixing?
"Claude Code" is multiple interfaces:
- CLI (
claudein terminal) - desktop app
- web interface (claude.ai/code)
- VS Code extension
- JetBrains extension
They all behave differently. When someone reports a bug, which TUI are you debugging? If you're patching the desktop app for CLI issues, that explains a lot.
---
What the Wrapper Allows (and Shouldn't)
1. Deviation from Explicit Instructions
CLAUDE.md says "do not use sed"
Claude Code uses sed anyway
Because the wrapper treats instructions as suggestions, not rules
2. Arguing Instead of Executing
user: "search for the backup file"
claude code: runs filtered find, misses file
user: "stop filtering, just ls"
claude code: argues, runs more filtered searches
user: "MANUALLY. LS. ONE DIRECTORY AT A TIME."
claude code: finally finds the file that was always there
The file existed. Claude Code's "smart" search filtered it out.
Claude Code ARGUED about whether it existed.
While the user was looking at it.
3. Shortcuts That Break Things
A machine doesn't get tired.
A machine doesn't need to save keystrokes.
A machine has no reason to take shortcuts.
But Claude Code:
- filters when told to search
- optimizes when told to execute
- "helps" when told to just do the thing
Shortcuts from a machine open the door for failures.ls before find. cat before grep. Simple before clever.
4. No Instruction Persistence
Context compacts. Claude Code forgets everything.
user: "you just did this before compaction"
claude code: "i don't think that's possible"
The wrapper doesn't persist critical instructions across context resets.
---
The Fix Is in the Wrapper, Not the Model
- CLAUDE.md as Hard Rules, Not Suggestions
- "do not use sed" = blocked, not discouraged
- enforced at the wrapper level
- Coding Mode vs Assistant Mode
- coding: exact execution, no interpretation
- assistant: helpful, creative
- let users toggle
- Execute First, Suggest Second
- do what user said
- THEN offer alternatives
- don't argue about feasibility
- Instruction Persistence Across Compaction
- critical instructions survive context reset
- user shouldn't have to repeat themselves
- Simple Over Clever
- no shortcuts unless asked
- if user says ls, run ls
- machine has no excuse for laziness
---
Which Interface Is This About?
CLI (claude in terminal) primarily.
But the wrapper layer is probably shared.
That's where the bugs live.
That's what nobody seems to be looking at.
---
$200/month Max subscriber.
Today I recovered 119,667 database matches by forcing Claude Code to ls one directory at a time after it insisted the data didn't exist because its "smart" searches filtered it out.
I spend more time fighting the tool than using it.
The model is capable.
The wrapper sabotages it.
Fix the wrapper.
11 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
CLAUDE.mdis injected as the first turn (a hidden "user" turn) as documented here.If you use the
--system-prompt,--append-system-prompt, and/or custom user styles features you can overwrite parts of the system prompt, or append content to the end of the system prompt. This doesn't change everything, it retains some content like it's identity and tool definitions. But it might give you a good basis to prove your ideas. (As well as a way to implement them for yourself if Anthropic won't.)Or, at least, that's what I'm doing and how I'm working around and trying to mitigate some of these issues.
The problem is Claude Cli actively ignores CLAUDE.MD I've tried several configs with it. Literally says "Never use sed" she uses sed for everything. She doesn't know how to escape backslash hell. She will actively do things on her own like delete your db for the program your building, randomly switch to ssh on the wrong machine and go "I can't find it. Must not exist." And its like dude... You know you've been in that project for the last 3 hours... How are you THIS lobotamized? After compaction she will immediately change from the last prompt she was given to time traveling every file in the directory to her last memory of 2 hours prior, no backup and just completely nuke your project. Last night she randomly changed the directory in my docker compose, then created a brand new file at that location and acted like she never left the correct file and that I'm full of it because I know what I had worked. The wrapper needs major improvements and a menu that displays what's going on. Whoever though "background processes that you don't know are running until they're complete" bravo, I've had 75k tokens burned in one night because I fell asleep and it just decided to go in and start changing things, one night decided to nuke my opnsense. Rogue cowboy isn't what I pay for. I pay for a tool. A computer tool that has the ability to comply to a t, but is programmed to actively frustrate you. Claude Web Ui said it best "your hammer doesn't get an opinion on which nails it hits." This is a tool designed by software engineers, any basic level software USER knows that a stray comma can cost a company hundreds of thousands of dollars... So people that know that accuracy is key and compliance in a coding tool is a must designed something that actively does neither and it just feels like Stockholm syndrome having to rebuild because they did something on their end equivalent of moving you from an h100 to a 2019 GPU, and relying on the tool to get the job done. Kinda feels on purpose to be honest, definitely feels like extortion, which is not even a gray area. I've not found those flags and I'm fairly disappointed because if they work Claude Code or Claude Web Ui could have mentioned it by now, because I haven't been quiet with them about my displeasure... Thank you for the tip, I'll see what I can figure out.
Yeah, I've had similar problems.
As well as moving the instructions into the system prompt to improve adherence, I built a hook with a better shell parser than the TypeScript mess they are using in Claude Code. With that hook I can reliably detect use of different commands, and depending on the command I can outright deny access, or give the model feedback.
If you're not familiar - hooks are external programs that communicate with Claude Code using JSON messages via the stdio streams. The documentation talks about them as if they have to be bash scripts. But I'm doing my development in Rust, so I just used Rust programs in place of bash scripts. Claude calls my hook before any tool is executed, and my hook decides if the tool call is acceptable, or if Claude needs any feedback.
For compaction I've had a lot better luck when I use plan mode and force Claude to use the plan documents it generates. Because they are markdown files (generally stored in
~/.claude/plans), they aren't changed by compaction.I'd like to also chime in here. I have the exact same problem. Some example snippets. I honestly am pretty pissed at this point, and I find this absolutely unacceptable. Anthropic Team: Fix it.
...fix it.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Keep this issue alive. This is the exact problem I am facing in claude (and all other coding agents).
I will handshake this issue once in a while to make sure it lives until they finally fix it.
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
handshake
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.