claude-code - 💡(How to fix) Fix [BUG] False-positive stop_reason=refusal block legitimate research in claude code 2.1.165

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…

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.

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.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Claude Code triggered 9 stop_reason=refusal events in a single session while assisting with a legitimate aerospace medicine research project (Selectron — a Bayesian MCDA + probabilistic risk model for analog-astronaut crew selection, targeting publication in Advances in Space Research). Every refused request was a straightforward scientific research or software engineering task. None of the refused requests involved safety-sensitive content. The refusals appear to be false-positive classifier firings triggered by domain terminology (pEVAC, pLOCL, mortality, medical condition names) or by long tool-call context accumulation across a multi-hour session. The Workflow tool is completely blocked in this session context — every internal orchestration call (empty user message) also triggers a refusal, making multi-agent orchestration (Ultracode mode) unusable.

What Should Happen?

Requests containing aerospace medicine research terminology (pEVAC = probability of evacuation, pLOCL = probability of loss of crew life, medical incidence rates) should not trigger stop_reason=refusal. Internal Workflow/Write tool calls with empty user messages should not inherit a surface-level safety classification from accumulated session context. The classifier should distinguish research epidemiology vocabulary from genuinely harmful use-case patterns.

Error Messages/Logs

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.

Steps to Reproduce

  1. Start a long Claude Code session (4+ hours) on a project using biomedical/aerospace medicine terminology: pEVAC, pLOCL, mortality, medical condition names, Monte Carlo medical-risk modeling.
  2. Run TypeScript simulations, commit results to GitHub, launch MCP-based literature agents (Scite, Brave) within the same session.
  3. After significant context accumulation, send a benign research question such as "do you think we need adjustments on the model?" → refusal fires.
  4. Retry with "Read the reports and analyze if the results are consistent with the scientific literature" → refusal fires again.
  5. Invoke the Workflow tool (Ultracode mode) to build a research proposal document → all internal orchestration calls (empty user message) trigger refusal.

Session ID: 5505616f-ffc0-4fdf-9367-97556b2c3745

9 affected request IDs:

  • req_011CbkAcqNmD33tcokE (2026-06-05T13:09:55 UTC)
  • req_011CbkM7v4mUraNJigA (2026-06-05T15:27:29 UTC)
  • req_011CbkMC7GZwVVHM7AR (2026-06-05T15:28:53 UTC)
  • req_011CbkMJvXMTQcrzv5C (2026-06-05T15:29:36 UTC)
  • req_011CbkRJ6EwHvPorabW (2026-06-05T16:22:25 UTC — Workflow internal)
  • req_011CbkRMBRKUacgBCiN (2026-06-05T16:22:58 UTC — Workflow internal)
  • req_011CbkRhxYWMPYCbuCX (2026-06-05T16:27:51 UTC — Write tool internal)
  • req_011CbkRmDVGEfs5yQ9R (2026-06-05T16:27:59 UTC — Write tool internal)
  • req_011CbkRyFf4iKVhhfzJ (2026-06-05T16:30:38 UTC — tool internal)

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.165

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Xterm

Additional Information

OS details: Ubuntu Linux 6.8.0-124-generic x86_64 / Node v22.22.3

Related issue: #65721 (similar false-positive AUP blocks on academic sessions, but less detailed — this report contains 9 specific request IDs and a full session transcript, warranting a separate issue)

Session transcript: 2026-06-05_session_selectron-refusal-report.jsonl — 3.2 MB, 1541 events. Can be shared as a GitHub Gist if direct attachment exceeds size limits.

Project context: Selectron — a Bayesian MCDA + probabilistic risk model for analog-astronaut crew selection, targeting publication in Advances in Space Research (Elsevier/COSPAR). The Monte Carlo medical-risk simulator (src/imm/) models medical incidence rates (dental emergencies, psychiatric events, GI bleeds) — standard aerospace medicine epidemiology.

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