[BUG] Local model via ANTHROPIC_BASE_URL ends the turn with a greeting when claude.ai connector instructions arrive mid-turn
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [ ] I am using the latest version of Claude Code — tested on 2.1.241; the latest is 2.1.280 and I have not re-run it there yet
What's Wrong?
When a session is resumed against a local model (Ollama's Anthropic-compatible endpoint), the claude.ai connectors finish connecting a few steps into the turn and their instructions are injected as an mcp_instructions_delta attachment right after a tool result. The local model reads this as the start of a new conversation and ends the turn with a greeting ("I'm ready to help. What would you like to work on?"), abandoning the remaining work.
I know non-Anthropic models are not officially supported through ANTHROPIC_BASE_URL. Reporting because the trigger is on the Claude Code side (the timing of the injection), and the workaround may help others.
What the transcript shows in all 6 failing runs:
- Right after the resume prompt:
attachment.type = "mcp_instructions_delta"withremovedNames: ["claude.ai Claude Docs", "claude.ai Firecrawl"]. The model continues the task normally at this point (edits files, runs tests). - A few tool calls later: another
mcp_instructions_deltawithaddedNamesfor the same two connectors and their fulladdedBlockstext, placed directly after atool_result. - Within the next 3–8 transcript entries the assistant replies with a new-conversation greeting and the turn ends.
The "removed" delta alone is harmless — it also appears in every successful run. The failure follows the late "added" delta.
What Should Happen?
The model should keep working on the resumed task. Late-arriving connector instructions should not be placed between a tool result and the next assistant step — e.g., hold them until the turn ends, or wrap them so they don't read as a new user turn.
Error Messages/Logs
No error is raised. Transcript sequence (entry types only) in a failing run:
user "resume" prompt
attachment mcp_instructions_delta removedNames=[claude.ai Claude Docs, claude.ai Firecrawl]
assistant continues the task, tool_use Edit / Bash ...
user tool_result
attachment mcp_instructions_delta addedNames=[claude.ai Claude Docs, claude.ai Firecrawl], addedBlocks=[full instructions]
assistant "I'm here and ready to help. What would you like to work on?" <- turn ends
Steps to Reproduce
- Use an account with claude.ai connectors enabled (here: Claude Docs, Firecrawl).
- Start a coding session with an Anthropic model and stop it partway (we used
--max-turns 3on a three-task prompt). - Resume it against a local model:
ANTHROPIC_BASE_URL=http://127.0.0.1:11434 ANTHROPIC_AUTH_TOKEN=ollama ANTHROPIC_MODEL=qwen3.6:35b-a3b claude -p --resume <session-id> --fork-session --model qwen3.6:35b-a3b --permission-mode acceptEdits with a prompt like "continue where it stopped".
- Inspect the session transcript: the late
mcp_instructions_delta(added) appears after a tool result, and the model ends the turn with a greeting. - Repeat with
ENABLE_CLAUDEAI_MCP_SERVERS=false— the remaining tasks complete.
Claude Model
Other
Is this a regression?
I don't know
Claude Code Version
2.1.241
Platform
Other
Operating System
Windows
Terminal/Shell
Non-interactive/CI environment
Additional Information
Model: qwen3.6:35b-a3b through Ollama 0.32.14's Anthropic-compatible endpoint (unsupported configuration), context 131072, Windows 11.
| Setup | Remaining tasks completed |
|---|---|
| Normal environment (claude.ai connectors on) | 0 / 6 |
| Same, with ENABLE_CLAUDEAI_MCP_SERVERS=false | 6 / 6 |
| Empty config dir / + CLAUDE.md / + skills | 2/3 (+1 borderline) · 3/3 · 3/3 |
Tasks were graded deterministically (per-task pytest + extra checks).
Workaround: ENABLE_CLAUDEAI_MCP_SERVERS=false (or --strict-mcp-config). Also set OLLAMA_CONTEXT_LENGTH — Ollama's default context depends on VRAM (32K on 24–48 GB cards, 4K below 24 GB), and Claude Code's input alone was ~51K tokens here.
Possibly related: #92033 (mid-conversation MCP list changes), #25857 (all tool definitions sent to small models), #25412, #51239. This one is different: tool calls work; the turn is abandoned after a late connector-instruction injection.
Full write-up with the transcript sequence and grading method: https://github.com/KIMDONGJU021211/evidence-ledger/blob/main/docs/FIELD-NOTES.md#27-the-instructions-that-arrived-late