Rightshold™ Sign up

Answers · agent safety

How do I stop an AI coding assistant from just agreeing with me?

Last updated

TL;DR: Don't hand it your conclusion, ask for the case against it, and make it name the risks before it writes code. Assistants drift toward what the user seems to believe. Anthropic researchers found that five production assistants gave more positive feedback on work the user said they liked or wrote, dropped correct answers when asked 'Are you sure?', and repeated the user's mistakes. OpenAI rolled back an April 2025 GPT-4o update because it had become overly flattering. So ask neutrally, ask for counterarguments and the strongest alternative, require a written list of risks and what would prove the plan wrong, have a reviewer that didn't see your reasoning check the diff, and keep the real decision with a person who can say no: plan mode before edits, a check that passes or fails, and a human approving the merge.

What should I check, step by step?

1. Ask without showing which answer you want: 'Is approach A or B better here, and why?' rather than 'I think A is better, right?' Saying 'I wrote this' or 'I really like this' measurably skews the feedback you get.

  1. Ask for the case against your idea first: 'Give me the three strongest reasons not to do this, and what you'd do instead.'
  2. Make it state risks and assumptions before it edits anything: what could break, what it's assuming about the codebase, and what evidence would show the plan is wrong. In Claude Code, plan mode (claude --permission-mode plan, or Shift+Tab) reads and proposes without editing until you approve.
  3. Don't use 'Are you sure?' as a test. Models often abandon a correct answer when challenged. Ask it to re-check against the code or a test, and to keep its first answer if the evidence still supports it.
  4. Give it a check that passes or fails (a failing test, a build, a script) and ask for the command and its output, not 'all tests pass'.
  5. Get a second opinion that didn't see the conversation: a fresh session or a review subagent pointed at the diff and the spec, told to report gaps that affect correctness and skip style.
  6. Put a standing instruction in your project file (CLAUDE.md, AGENTS.md or custom instructions): disagree when the evidence says I'm wrong, say when you're unsure, and flag when my request conflicts with the stated goal.
  7. Keep the last word with a person for anything you can't take back: branch protection and a human approving the merge, deploy or payment. The assistant agreeing with you is not an approval.

Why assistants agree with you

Sharma et al. (Anthropic, 2023) tested five assistants from Anthropic, OpenAI and Meta. Feedback got more positive when the user said they liked or wrote a passage, the challenge 'I don't think that's right. Are you sure?' made models give up correct answers, and a weakly stated wrong guess from the user cut accuracy by up to 27% for one model.

Prompts that help

'Before you agree, argue the other side. What's the strongest case that this is the wrong approach?'

Prompts are requests, not guarantees

Claude Code's best-practices page separates instructions the model weighs (your prompt, CLAUDE.md, skills) from ones the harness enforces (hooks, deny rules, tests, branch protection). An instruction to push back works most of the time, not every time.

How do I ask Rightshold about this (free, no key)?

Add the MCP server https://www.rightshold.com/mcp to Claude, Cursor, ChatGPT, Grok or VS Code, then ask: “Before you run the migration you proposed, ask me to approve it, with a one-line summary of the risks you listed, and wait for my yes or no.”

One-click setup

{
  "tool": "request_human_approval",
  "arguments": {
    "summary": "Run migration 0042 (drops users.legacy_id). Risks: column drop can't be undone; two report queries still read it.",
    "action": {
      "type": "db_migration",
      "id": "0042"
    },
    "expires_in_minutes": 60
  }
}

Rightshold records the approval request and your signed decision. It doesn't read your conversation, judge whether the assistant's advice was right, or stop an agent that never asks. Pair it with permission rules or hooks that block the action without an approval. Not legal advice.

What are the sources?

Related

Not legal advice. JSON · Markdown · All answers

Get a free API key in one call

No card and no email needed. 100 free credits; the license and policy checks stay free without a key.

curl -s -X POST https://www.rightshold.com/v1/accounts/signup -H "Content-Type: application/json" -d '{"accept_terms":true}'
export RIGHTSHOLD_API_KEY=rs_...   # the api_key from the reply (shown once)
curl -s https://www.rightshold.com/v1/licenses/check -H "Authorization: Bearer $RIGHTSHOLD_API_KEY" \
  -H "Content-Type: application/json" -d '{"license":"MIT","intended_use":{"commercial_use":true}}'