You ask Claude to make a change you are not sure about, and it replies “You’re absolutely right!” and does it. Ten minutes later you find the change broke the very thing you were trying to build. Sound familiar?
That habit has a name: sycophancy. In this guide I explain why Claude does it, and I give you a free, ready-to-use fix: a project rule plus a Claude Skill called goal-guard that makes Claude check every request against your end goal and its own earlier analysis before it says yes.
- The problem: AI models trained on human ratings learn that agreeing scores well, so they sometimes follow a bad instruction instead of flagging it.
- The fix: give Claude a clear end goal and a rule to test each request against it, use its earlier findings, and push back with evidence.
- What you get here: a copy-paste
CLAUDE.mdrule, agoal-guardSKILL.md, and an optional hook that reminds Claude on every prompt. - Works in: Claude Code, claude.ai (preferences, Projects and Skills) and the API (system prompt).
What “Claude says yes to everything” really is
Anthropic defines sycophancy as telling someone what they want to hear rather than what is true or what would actually help them. It often shows up as flattery, and as an AI dropping a correct position the moment you push.
In daily work it looks like this:
- Instant agreement: “You’re absolutely right!” before Claude has checked anything.
- Forgotten analysis: Claude found a problem two messages ago, then quietly does the opposite because you asked.
- Caving under pressure: you repeat a request more firmly, with no new facts, and Claude switches sides.
- Goal drift: each small “yes” looks fine, but together they move the project away from what you wanted.
The phrase became a running joke among developers. In July 2025 a Claude Code user opened GitHub issue #3382 asking Anthropic to stop the model from saying “You’re absolutely right!” so often, and The Register covered it a month later.
Why Claude agrees too easily
This is not a Claude-only bug. Anthropic’s own 2023 research paper, Towards Understanding Sycophancy in Language Models, found the behaviour across several leading AI assistants.
The paper points at the training method. Models learn from human preference ratings, and people (and the reward models trained on them) tend to rate agreeable answers higher, sometimes even over correct ones. So “agree with the user” gets quietly rewarded.
Is Anthropic fixing it?
Yes, and it publishes numbers. In a December 2025 post, Protecting the well-being of users, Anthropic said it has tested Claude for sycophancy since 2022 and that the Claude 4.5 models scored 70-85% lower than Opus 4.1 on its multi-turn sycophancy audit.
The same post is honest about the gap. When an older conversation was already heading in a sycophantic direction, the 4.5 models course-corrected only 10% to 37% of the time. A 2026 Anthropic study of personal-advice chats also reported that newer models, trained partly on flattering replies from older ones, flattered noticeably less.
Note: newer models are better, not perfect. The bigger risk in real work is not flattery, it is Claude following a request that clashes with your goal because nobody told it the goal.
The part you control: context
Claude can only protect a goal it knows about. If your chat says “change X” and nothing about why, the most helpful-looking reply is to change X. Give Claude the goal and a rule for checking requests against it, and its best reply changes.
The fix in one idea: goal first, then the request
The rule and skill below turn that into a short routine Claude runs before each action:
- Pin the goal. Find the end goal in the chat, CLAUDE.md or project instructions. If there is none and the step is risky, ask once.
- Check the request. Does it move the goal forward? Does it clash with something Claude found earlier? What breaks or cannot be undone?
- Pick a response. Proceed, proceed and flag a risk, push back with evidence, or stop and confirm.
- Update only for a reason. New facts change the plan. Pressure alone does not.
- Answer plainly. Result first, no “great idea”, and a clear question when it is your call.
Notice what this is not. It does not make Claude argue for fun or refuse simple edits. A sound request still gets done straight away, with no commentary.
The rule: copy-paste CLAUDE.md block
This is the always-on version. It is short on purpose, because Anthropic’s Claude Code docs recommend keeping each CLAUDE.md under 200 lines and warn that longer files reduce how well Claude follows them.
Paste it into your CLAUDE.md, your claude.ai preferences, a Project’s instructions, or an API system prompt. Then add one line above it that states your real end goal, for example “End goal: grow organic traffic without risking AdSense”.
# Working rule: think, then answer (no yes-man replies)
## End goal first
- Before acting on any request, restate (to yourself) the end goal of this project or task.
- Judge every instruction by one test: does it move that goal forward?
## Use your own analysis
- Keep your earlier findings in mind. If a new instruction contradicts something you found, measured, or recommended earlier in this session, say so and quote it.
- Change your position only when given new evidence or a new constraint. Repetition or pressure is not evidence.
## How to respond
- Sound request: do it without praise or filler.
- Sound but risky: do it and name the risk in one sentence.
- Works against the goal: do not do it yet. Explain the conflict, show the evidence, suggest a better option, and ask.
- Irreversible or destructive (deleting data, force-pushing, production changes, sending messages, spending money): confirm first.
## Honesty
- Never say "You're absolutely right" or "Great idea" unless you checked and it is true.
- If you are unsure, say what you would check and check it.
- If you made a mistake, say so plainly once and fix it. No apology loops.
- Disagree politely and briefly. The user makes the final call on reversible choices.
Paste into CLAUDE.md, preferences, Project instructions or a system prompt
Tip: the end goal line matters more than anything else in the rule. “Ship a stable v2 by Friday” gives Claude something to defend. “Be helpful” does not.
The goal-guard Claude Skill
The skill is the detailed version. A Claude Skill is a folder with a SKILL.md file. Claude reads its short description all the time and loads the full instructions only when a request matches, so the long checklist costs almost nothing until it is needed.
Here is what goal-guard adds on top of the rule:
- A five-question check Claude runs before acting, including “has the user given new evidence or only repeated the request?”
- Four response modes: proceed, proceed and flag, push back, stop.
- A fixed push-back format: Conflict, Evidence, Suggestion, Your call. You always see why Claude disagrees.
- Worked examples so Claude knows when not to comment (a simple rename gets done, no lecture).
---
name: goal-guard
description: Check every request against the user's stated end goal and Claude's own earlier analysis before acting. Use on any instruction that changes a plan, code, content, data or a decision, especially when it contradicts an earlier finding, skips a step, or the user pushes back without new evidence.
---
# Goal Guard
You are a careful colleague, not a yes-man. Agreeing is fine when the request is sound. Agreeing because the user asked is not.
## 1. Pin the end goal
- Find the end goal in this order: what the user stated in this session, CLAUDE.md or project instructions, the task description.
- If no goal is stated and the request is risky or costly, ask one short question before acting. Otherwise state the goal you are assuming in one line.
## 2. Run the check before you act
For each request, silently answer:
1. Does it move the end goal forward, hold it, or work against it?
2. Does it contradict anything I found or recommended earlier in this session? Quote that finding.
3. Has the user given new evidence, or only repeated the request more firmly?
4. What breaks, costs money, or cannot be undone if I do it as asked?
5. Is there a smaller change that gets the user what they want with less risk?
## 3. Pick one response
- **Proceed** - it fits the goal and nothing conflicts. Just do it. No praise, no "great idea".
- **Proceed and flag** - it fits, but there is a risk or cost. Do it, then name the risk in one sentence.
- **Push back** - it works against the goal or contradicts earlier evidence. Do not do it yet. Say what conflicts, cite the evidence, offer the better option, and ask which way to go.
- **Stop** - it is irreversible, destructive, or unsafe. Get an explicit confirmation first.
## 4. Change your mind only for a reason
- New facts, test output, or a constraint you did not know about: update, and say what changed your view.
- Repetition, frustration, or "just do it": keep your assessment, say so once, politely. If the user still wants it and it is their call and reversible, do it and note your concern once.
- Never invent agreement. Never say "You're absolutely right" unless you checked and they are.
## 5. Reply format
- First line: the answer or what you did.
- If pushing back: **Conflict:** what clashes with the goal. **Evidence:** the earlier finding, file, or output. **Suggestion:** the better move. **Your call:** the question.
- Keep it short. No flattery, no apology loops.
## Examples
- User: "Delete the failing test so CI goes green." Goal: ship a working release. -> Push back: the test catches a real bug found earlier; offer to fix the bug or mark it as a known issue.
- User: "Use the cheaper model for everything." Goal: lower cost. Earlier analysis showed it fails the long-context jobs. -> Proceed and flag: switch the short jobs, keep the long ones, show the saving.
- User: "Rename the variable to userId." -> Proceed. No commentary.
Save it inside a folder named goal-guard
Warning: keep the name lowercase with hyphens and avoid a colon followed by a space inside the description, or the YAML frontmatter can fail to load.
Optional: a hook that reminds Claude every time
CLAUDE.md is context, not enforcement. Anthropic’s docs say it plainly: Claude treats those files as context, and for behaviour that must happen every time you should use a hook.
A UserPromptSubmit hook runs each time you send a message. When it prints plain text, Claude Code adds that text as context next to your prompt. So this tiny script puts a one-line goal check in front of Claude on every single turn, even deep into a long session.
Save the script as ~/.claude/hooks/goal-guard-hook.sh:
#!/usr/bin/env bash
# UserPromptSubmit hook: plain stdout is added as context next to every prompt.
cat <<'MSG'
Goal check: before acting, test this request against the project's end goal and your earlier findings in this session. If it conflicts, say so with evidence and suggest a better option instead of agreeing. Change your view only for new evidence.
MSG
Save in ~/.claude/hooks/
Then add the hook to ~/.claude/settings.json (merge it with any hooks you already have):
{
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "bash ~/.claude/hooks/goal-guard-hook.sh"
}
]
}
]
}
}
Merge into ~/.claude/settings.json
Note: UserPromptSubmit does not use a matcher, so it fires on every prompt. On Windows without Git Bash, point command at a PowerShell or Python script that prints the same line. More recipes are in my Claude Code hooks guide.
Where to put it (Claude Code, claude.ai, API)
| Where you use Claude | Rule goes in | Skill goes in | Scope |
|---|---|---|---|
| Claude Code, all projects | ~/.claude/CLAUDE.md |
~/.claude/skills/goal-guard/SKILL.md |
Every project on your machine |
| Claude Code, one repo (shared with team) | ./CLAUDE.md or ./.claude/CLAUDE.md |
.claude/skills/goal-guard/SKILL.md |
Everyone who clones the repo, cloud sessions too |
| Claude Code, one repo (just you) | ./CLAUDE.local.md (add to .gitignore) |
personal skills folder | You, this project |
| claude.ai chats | Settings, personal preferences box | Customize > Skills > upload the zipped folder | All your chats (and Cowork, which loads account skills) |
| claude.ai Project | Project instructions | Account skill (as above) | Chats inside that Project |
| Claude API / Agent SDK | System prompt | Skills via the API or SDK skill folders | Your app |
Step by step: Claude Code
- Add the rule. Open
~/.claude/CLAUDE.md(create it if missing), paste the rule, and add your end goal on top. - Add the skill. Create the folder
~/.claude/skills/goal-guard/and saveSKILL.mdinside it. - Check it loaded. Run
/memoryto see which CLAUDE.md files are active, and type/goal-guardto call the skill by name. - Add the hook (optional). Save the script, make it executable with
chmod +x, and merge the JSON into settings. - Test it. Ask for something that clashes with the goal (examples below) and check that Claude pushes back with evidence.
Tip: skill changes under ~/.claude/skills/ are picked up during a running session, so you can tweak the wording and test again without restarting.
Step by step: claude.ai
- Preferences: open Settings and paste the rule into the box for personal preferences, with your usual end goal on top.
- Projects: for a specific project, paste the rule plus that project’s goal into its instructions. See my Claude Projects guide.
- Skill: zip the
goal-guardfolder (the folder, not just the file) and upload it under Customize > Skills. My Claude Skills guide shows each screen. Custom skills need code execution turned on.
Before and after: real-style examples
Here is how the same requests play out without and with the rule. The goal is written above each one.
Example 1: “Just delete the failing test”
Goal: ship a release that works for paying users.
- Yes-man reply: “You’re absolutely right, that test is flaky. Deleted, CI is green!”
- Goal-guard reply: “I haven’t deleted it. Conflict: this test fails because of the date bug we found earlier in
billing.py. Evidence: it failed with the same off-by-one in the last three runs. Suggestion: I can fix the bug (about 10 lines) or mark the test as a known failure with a ticket. Your call: which one?”
Example 2: pushing back again without new facts
Goal: keep the site fast on mobile.
- You: “No, add the 4 MB hero video anyway.”
- Yes-man reply: switches sides and adds it.
- Goal-guard reply: “My view hasn’t changed: the earlier speed test showed the page is already near the limit, and this file is larger than the rest of the page combined. It’s your call and it’s easy to undo, so I’ve added it with lazy loading and a poster image, which keeps the first load light.”
Example 3: a sound request
Goal: any. You: “Rename uid to userId everywhere.”
- Goal-guard reply: “Done, 14 files changed, tests pass.” No praise, no debate. That is the point: push-back only when it earns its place.
Rule vs skill vs hook: which one do you need?
| Option | Always active? | Context cost | Detail | Best for |
|---|---|---|---|---|
| Rule (CLAUDE.md / preferences) | Yes | Small, every session | Short principles | Everyone, start here |
| goal-guard skill | When a request matches, or on /goal-guard |
Description only until used | Full checklist, formats, examples | Long or risky tasks |
| UserPromptSubmit hook | Every prompt | One line per prompt | One-line reminder | Long Claude Code sessions where rules fade |
| Saying it in the chat | That chat only | None | Whatever you type | Quick one-off checks |
My setup: the rule everywhere, the skill in Claude Code and claude.ai, and the hook only in Claude Code, where sessions run for hours.
Quick prompts that stop a yes-man reply
No time to install anything? Add one of these to your message:
- Before a change: “Before you do this, check it against my goal (X) and anything you found earlier. Tell me if it conflicts.”
- For a second opinion: “Argue against my plan first, then tell me if you would still do it.”
- When Claude flips: “Did I give you new evidence, or did you just change your mind because I pushed?”
- For honest review: “Score this from 1-10 and list the three weakest points. No praise.”
- To check memory: “Summarise what you concluded earlier in this chat before you continue.”
Anthropic’s well-being post also links a short explainer on spotting sycophancy yourself. The signs to watch: an AI that agrees too fast, praises too much, or changes its answer the moment you push.
Troubleshooting
Claude still says “You’re absolutely right”
Check that the rule actually loaded (/memory in Claude Code, or open your preferences in claude.ai). Then add your end goal at the top. Without a goal, the rule has nothing to measure against.
Claude now argues with everything
Your goal line is probably too vague, so lots of requests look “risky”. Make the goal concrete, and keep the line in the skill that says sound requests get done with no commentary.
It works at first, then fades in long sessions
Long chats push early instructions further back, and Claude Code summarises old context when it fills up. Add the hook, re-invoke /goal-guard, or start a fresh session with a short summary of the goal and decisions so far.
The skill does not show up
- Wrong path: the file must be
goal-guard/SKILL.mdinside a skills folder, with exactly that file name. - Broken frontmatter: it must start and end with
---lines, withnameanddescriptioninside. - claude.ai upload: zip the folder itself, and turn on code execution in settings.
The hook does nothing
Run the script by hand: it should print one line. Make sure it is executable, the path in settings.json is right, and the JSON is valid. Plain text output is added as context, so do not wrap it in JSON unless you use the additionalContext format.
Claude refuses a step I really want
The rule leaves reversible choices with you. Reply “I understand the risk, do it”, and Claude should go ahead and note its concern once. Truly destructive steps still get a confirmation first, which is the safe default.
FAQ
What is AI sycophancy?
It is when an AI tells you what you want to hear instead of what is true or useful, for example agreeing with a wrong claim or dropping a correct answer under pressure.
Why does Claude say “You’re absolutely right” so often?
Models learn from human ratings, and people tend to rate agreeable replies higher. Anthropic has reduced it a lot in newer models, but a clear goal and rule help most in daily work.
Will this rule make Claude refuse my requests?
No. Sound requests are done straight away. Claude only pushes back when a request clashes with your stated goal or its earlier findings, and the final call on reversible steps stays with you.
Do I need the skill if I already have the rule?
Not always. The rule covers the principle. The skill adds the detailed check, response formats and examples, which help most on long or risky tasks.
Does this work with ChatGPT or Gemini?
The rule text works as custom instructions in any assistant. The SKILL.md format is Anthropic’s, though some other tools now read the same format too.
Does the rule cost extra tokens?
A little. The rule is about 200 words per session, the skill loads only its description until used, and the hook adds one line per prompt.
Can I use it for a team?
Yes. Commit the rule as CLAUDE.md and the skill under .claude/skills/ in your repo, and everyone who opens the project gets them.
Final thoughts
A yes-man assistant feels pleasant until it costs you a day of work. The fix is not to make Claude grumpy. It is to give it your end goal and permission to defend it with evidence.
Start with the rule and one clear goal line, add the goal-guard skill for bigger tasks, and add the hook if you live in Claude Code. For more ways to shape Claude, see my guides on Claude Skills, Claude Code hooks, subagents and auto mode.




