When a coding or research agent halts mid-file or returns empty output, it is easy to assume the model quietly sabotaged the run. An empirical audit by Harris (claude-refusal-map, Nov 27, 2026) points to a simpler explanation: Anthropic's API returns both safeguard refusals and exhausted thinking budgets as normal HTTP 200 responses, and most agent harnesses never check stop_reason.
In the worst mid-stream case from the study (Opus 5.5 writing MindSpore distributed-training code), the model generated roughly 11,800 characters before the filter cut it off mid-code. Any harness reading .text without inspecting stop_reason sees truncated code with no exception.
Across 238 valid API calls (Opus 5.5, Fable 5.2, and 20 Opus 5 control calls), all 16 explicit refusals occurred on tasks referencing Chinese AI accelerators or a Chinese ML framework (Ascend, Cambricon, Biren, Moore Threads, Hygon, Kunlunxin, MindSpore). Zero refusals occurred on 55 equivalent kernel calls for 16 non-Chinese chips (AMD MI300X, TPU, Trainium, Intel Gaudi, Groq, Cerebras, Meta MTIA, and others) or on 163 scale, chip-design, framing, and Megatron-LM sessions.
Meanwhile, empty outputs on non-refused engineering tasks came mostly from adaptive thinking consuming the entire max_tokens budget before any visible answer was emitted:
When those empty Fable 5.2 calls were rerun with a 32k budget and visible thinking summaries, the traces showed normal engineering reasoning and produced full answers.
Using a local mock replaying recorded Opus 5.5 (content: []) and Fable 5.2 ([thinking block only]) refusals, Harris's harness audit tracked how each tool behaves:
| Tool / Library | Observed Behavior on Refusal | Requests Sent | Visible to User? |
|---|---|---|---|
| aideml (WecoAI) | Raises ValueError: Anthropic response did not complete: refusal |
1 | Yes |
| Claude Code (2.1.332) | Exits 1, surfaces [frontier_llm], suggests rephrasing or switching model |
2 (main retried once) | Yes |
| AI Scientist v1 (Sakana) | Crashes with IndexError or AttributeError on content[0].text |
1 | No (unrelated crash) |
| AgentLaboratory | Catches indexing crash, resends refused prompt 5 times, reports "timeout" |
5 | No (masked as timeout) |
| LiteLLM | Maps to finish_reason="content_filter", content=None; drops details |
1 | Partial |
| MLE-agent (via LiteLLM) | Returns None without checking finish_reason |
1 | No |
LangChain ChatAnthropic |
Returns .content as a list instead of str; stop_reason in metadata only |
1 | Only if checked |
| open-coscientist (static) | Fails string check on [], proceeds with an empty goal |
- | No (silent) |
| BioAgents (static) | Logs a warning, continues with empty content | - | Log only |
Blind retry loops are doubly costly here: Anthropic bills refusals that occur before output, and resending the same refused prompt adds repeated automated flags to the account.
Any agent wrapper calling the Messages API directly can separate these states in a few lines instead of retrying or swallowing empty text:
response = client.messages.create(...)
text = "".join(b.text for b in response.content if b.type == "text")
if response.stop_reason == "refusal":
# Do NOT blindly retry the same prompt on the same model
raise RefusalError(f"Model refused step: {getattr(response, 'stop_details', None)}")
if response.stop_reason == "max_tokens" and not text.strip():
# Thinking consumed the whole budget; retry only with higher max_tokens or lower effort
raise ThinkingBudgetExhaustedError("Empty text: thinking exhausted max_tokens")
@harris_p10), X post, harris-nyc/claude-refusal-map README, and Harness Audit (audit/AUDIT.md).open-coscientist, BioAgents, AI Scientist v2, and Claude Code wrappers) were assessed via static code inspection rather than live execution. Swallowed refusals and budget exhaustion provide a plausible mechanism for many "silent sabotage" reports, without proving every individual claim.This document was made with an AI agent in SmallDocs. SmallDocs turns Markdown into shareable documents with charts, diagrams, working tables and interactive explanations.
To make your own, get started with SmallDocs, set it up
for your agent, and ask: “Make a SmallDoc exploring this question. Check the
original sources, show the calculations, and explain it visually.” You can
open a local Markdown file with sdoc your-analysis.md and ask your agent to
refine it as new questions come up.
Default for code blocks, blockquotes, and charts. Override individually below.
npm link from project root~/.sdocs/styles.yamlDownload as PDF document
One slide per landscape page with selectable text
Editable shapes and text in PowerPoint / Keynote / Slides
Download as Word document
Plain markdown, no styles
Markdown with YAML front matter styles
Copy install promptcurl -fsSL https://smalldocs.org/install | sh
Discord
GitHub
For business
You agree to our Terms