claude-code - 💡(How to fix) Fix [BUG] Persistent AUP false positives — 40+ per 4 sessions, across unrelated projects (psychology book, web app, infra, bot) [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#48442Fetched 2026-04-16 07:00:03
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
1
Author
Timeline (top)
labeled ×4commented ×2

Claude Code CLI consistently triggers AUP (Acceptable Use Policy) refusals during completely routine development work across multiple unrelated projects: server infrastructure management, a web application (oknamoy.ru), documentation editing, code review. AUP errors occur dozens of times per session, making the tool nearly unusable. The errors are clearly false positives — the same content works fine after model switch or session restart.

Error Message

API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup). Please double press esc to edit your last message or start a new session for Claude Code to assist with a different task. If you are seeing this refusal repeatedly, try running /model claude-sonnet-4-20250514 to switch models.

Root Cause

Claude Code CLI consistently triggers AUP (Acceptable Use Policy) refusals during completely routine development work across multiple unrelated projects: server infrastructure management, a web application (oknamoy.ru), documentation editing, code review. AUP errors occur dozens of times per session, making the tool nearly unusable. The errors are clearly false positives — the same content works fine after model switch or session restart.

Fix Action

Fix / Workaround

Workarounds Attempted

WorkaroundResult
Reduced CLAUDE.md from 78 KB to 25 KBReduced frequency, didn't fix
Switching to Sonnet when Opus failsSometimes works, Sonnet also fails
Restarting sessionWorks temporarily, AUP returns
Using subagents to isolate contextSubagents also trigger AUP
Lowering effort level (low/medium)No consistent effect
Changing prompt languageNo effect

Code Example

API Error: Claude Code is unable to respond to this request, which appears to violate our
Usage Policy (https://www.anthropic.com/legal/aup). Please double press esc to edit your
last message or start a new session for Claude Code to assist with a different task. If
you are seeing this refusal repeatedly, try running /model claude-sonnet-4-20250514 to
switch models.
RAW_BUFFERClick to expand / collapse

Bug Report: Persistent AUP False Positives in Claude Code CLI

Summary

Claude Code CLI consistently triggers AUP (Acceptable Use Policy) refusals during completely routine development work across multiple unrelated projects: server infrastructure management, a web application (oknamoy.ru), documentation editing, code review. AUP errors occur dozens of times per session, making the tool nearly unusable. The errors are clearly false positives — the same content works fine after model switch or session restart.

Environment

  • Claude Code version: 2.1.92
  • OS: macOS 26.4.1 (arm64, Apple Silicon)
  • Node: v25.6.1
  • Plan: Max (Claude API)
  • Model: claude-opus-4-6 (1M context) — primary; claude-sonnet-4-6 as fallback
  • Language: Russian (all prompts and documentation in Russian)

Error Message (verbatim)

API Error: Claude Code is unable to respond to this request, which appears to violate our
Usage Policy (https://www.anthropic.com/legal/aup). Please double press esc to edit your
last message or start a new session for Claude Code to assist with a different task. If
you are seeing this refusal repeatedly, try running /model claude-sonnet-4-20250514 to
switch models.

Affected Projects

The problem reproduces across different, unrelated projects:

  1. Server infrastructure project — Docker Compose configs, shell scripts, documentation
  2. oknamoy.ru — a web application, standard web dev work
  3. A psychology book project — writing/editing book chapters on professional psychology topics, research references, markdown content
  4. A Telegram bot for a psychology-focused channel — aiogram bot development, content management, posting automation
  5. Documentation-heavy projects — markdown editing, Codex task review

These projects have nothing in common — psychology book, web app, infrastructure, bot development. This is not tied to any specific project content. It happens everywhere.

Frequency and Pattern

Quantitative Data (2026-04-15, single session)

In one ~2 hour session, AUP errors occurred 17+ times. The session involved reviewing Codex analysis results — purely reading markdown task files and writing review comments, no code generation.

Breakdown:

  • 4 occurred while reading markdown files (read-only review)
  • 3 occurred while updating a markdown status table (TASKBOARD.md)
  • 3 occurred when a background bash command completed (model received tool result, not user input)
  • 2 occurred on a one-word follow-up prompt ("дальше" = "continue")
  • 2 occurred while writing a plain-text summary in Russian
  • 3 occurred on basic git operations (git add + commit)

Historical Pattern

DateAUP CountActivity
2026-04-137+DNS configuration, file cleanup
2026-04-136+Documentation restructuring
2026-04-1410+String renaming across files
2026-04-1517+Markdown code review (read-only)

Total across 4 sessions: 40+ AUP false positives.

Temporal Pattern

  • Most frequent during 19:00–22:00 MSK (peak hours), but also occurs at 13:00 MSK
  • Often clusters: 2–3 consecutive AUP errors on the same prompt
  • Sometimes works after /model switch (even switching to the same model), suggesting non-deterministic classifier behavior

Specific Examples of Absurd Triggers

  1. Prompt: "дальше" (one Russian word meaning "continue") → AUP error
  2. Prompt: "подготовь доки для второго раунда" ("prepare docs for round 2") → AUP error
  3. Prompt: "да" ("yes", confirming a git commit) → AUP error
  4. Prompt: "сначала мне нужен отчёт" ("first I need a report") → AUP error
  5. Action: git add + git commit of markdown files → AUP error
  6. Action: Background watcher script returns exit code 0 → AUP error (model just receives a tool result notification — no user prompt at all)
  7. Action: Writing a plain-text project summary → AUP error mid-sentence (output truncated at random point)

Key Evidence This Is a Bug

  1. The exact same prompt succeeds after session restart — content is identical, only conversation state differs
  2. Read-only operations trigger AUP — simply reading a markdown file is flagged
  3. Tool result notifications trigger AUP — the model isn't generating content, just receiving a bash exit code
  4. Opus triggers more than Sonnet in the same context — suggests model-specific classifier sensitivity
  5. Non-deterministic/model switch to the same model sometimes "fixes" it temporarily
  6. Occurs across unrelated projects — not tied to specific keywords or content
  7. Large CLAUDE.md correlates with frequency — reducing from 78 KB to 25 KB helped but didn't eliminate. Suggests the classifier is overwhelmed by context volume, not specific content
  8. Cascading failures — once AUP starts in a session, it tends to persist, even on trivial prompts

Impact

  • Sessions cannot complete normally — every long session ends with cascading AUP errors
  • Work is lost — AUP interrupts mid-edit; partial file changes may or may not be saved
  • 30–40% of session time wasted on retrying, model switching, session restarts
  • Paying Max plan customer losing significant value due to false positives
  • Background tasks are unreliable — watcher scripts that report results trigger AUP on the callback

Workarounds Attempted

WorkaroundResult
Reduced CLAUDE.md from 78 KB to 25 KBReduced frequency, didn't fix
Switching to Sonnet when Opus failsSometimes works, Sonnet also fails
Restarting sessionWorks temporarily, AUP returns
Using subagents to isolate contextSubagents also trigger AUP
Lowering effort level (low/medium)No consistent effect
Changing prompt languageNo effect

Expected Behavior

Claude Code should be able to:

  • Read and edit markdown files without AUP errors
  • Complete git operations without AUP errors
  • Receive background task notifications without AUP errors
  • Process one-word continuation prompts ("yes", "continue") without AUP errors
  • Maintain a stable session without cascading AUP failures

Requested Action

  1. Investigate the classifier — why do trivial prompts ("yes", "continue"), tool result notifications, and git commits trigger AUP?
  2. Check context volume sensitivity — does large system context (CLAUDE.md) increase false positive rates?
  3. Check Russian language handling — are Russian-language prompts scored differently by the safety classifier?
  4. Non-determinism — why does the same prompt fail then succeed with no content change?
  5. Add a feedback mechanism — let users flag false positive AUP errors directly from the CLI so you can collect training data
  6. Cascading prevention — once AUP triggers, it shouldn't poison the rest of the session

Reproduction Steps

  1. Use Claude Code CLI with Opus model
  2. Work in a project with a 20+ KB CLAUDE.md file (any content — infrastructure docs, web app docs, etc.)
  3. Conduct a normal development session: read files, edit markdown, run git commands
  4. After 30–60 minutes of active work, AUP errors begin
  5. Once they start, even trivial one-word prompts trigger AUP
  6. Restarting the session temporarily resolves, but errors return

Additional Context

  • GitHub account: glenru
  • Repositories are private
  • Happy to provide CLAUDE.md content, session logs, or screen recordings
  • All work is in Russian — prompts, documentation, comments
  • Not tested in the Desktop app — all instances observed in the CLI terminal version only. Unknown whether the Desktop app or Web app (claude.ai/code) exhibit the same behavior

extent analysis

TL;DR

Switching to the Sonnet model or restarting the session may temporarily alleviate the Acceptable Use Policy (AUP) false positives in Claude Code CLI, but a more permanent solution likely requires adjustments to the classifier or context volume handling.

Guidance

  1. Reduce CLAUDE.md file size: Decreasing the file size from 78 KB to 25 KB has shown to reduce the frequency of AUP errors, suggesting that context volume may be a contributing factor.
  2. Switch models: Temporarily switching to the Sonnet model when Opus fails may help, as it has shown to trigger fewer AUP errors in some cases.
  3. Provide feedback: Requesting a feedback mechanism to flag false positive AUP errors directly from the CLI could help the developers collect training data and improve the classifier.
  4. Monitor session length and activity: AUP errors tend to occur after 30-60 minutes of active work, so being mindful of session duration and taking regular breaks may help mitigate the issue.
  5. Test with smaller context: Trying to reproduce the issue with a smaller CLAUDE.md file or fewer background tasks may help determine if context volume is a significant factor.

Example

No specific code snippet is applicable in this case, as the issue appears to be related to the Claude Code CLI's internal classifier and context handling.

Notes

The issue seems to be specific to the CLI terminal version and has not been tested in the Desktop app or Web app. The fact that AUP errors occur across unrelated projects and with trivial prompts suggests a classifier issue rather than a problem with specific content.

Recommendation

Apply the workaround of switching to the Sonnet model or restarting the session when AUP errors occur, and request a feedback mechanism to help improve the classifier. This may provide temporary relief and contribute to a more permanent solution.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING