anthropics / anthropics/claude-code
[BUG]
- Lingua principale
- Python
- Stelle
- 145k
- Fork
- 23.1k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
### Preflight Checklist
- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
### What's Wrong?
# Bug: image input kills the session — glm-5.3:cloud via Ollama
**Date:** 2026-08-31 · **Found in:** Claude Code (VS Code terminal, macOS 26 / Apple Silicon)
## Symptom
- Pasting/reading an image in Claude Code fires a red `API Error` instantly.
- Every subsequent prompt repeats the same error — the session is permanently bricked.
- Bricked session produces no handoff or memory updates for the next instance.
## Root cause — two separate failures
**Layer 1 — the 400 itself is the provider's, and it is correct:**
- Claude Code → local Ollama (`ANTHROPIC_BASE_URL=http://127.0.0.1:11434`, v0.31.1) → ollama.com cloud (`glm-5.3:cloud`).
- CC forwarded the image intact; server replied `400 this model does not support image input (ref: b1feda6a-…)`.
- `ollama show glm-5.3:cloud` confirms: capabilities are **completion, thinking, tools** — **no vision**. The model card's image claim doesn't hold for the `:cloud` serving path.
**Layer 2 — the brick is Claude Code's:**
- The rejected image stayed in the conversation history as a 634KB tool_result.
- A deterministic 400 can't be fixed by retry, but CC re-sends full history every turn → every prompt re-fails identically, with no recovery affordance offered.
## Recovery
- **Live session:** press **Esc Esc** (rewind) to the point *before* the image was fetched — this truncates the transcript and un-bricks the session.
- **Closed session:** strip the image from the on-disk transcript (with backup), then `claude --resume`:
`~/.claude/projects/-Volumes-HOMEX-…-clients-wcb/48397606-b5d4-4222-8f41-56f0cdf48f38.jsonl` (image at line 12).
## Prevention
- Treat `glm-5.3:cloud` as text-only in Claude Code. Check `ollama show ` for a vision capability before pasting images.
- On any deterministic 400: rewind immediately (Esc Esc) rather than continuing to prompt.
## Reported upstream
- Claude Code feedback report drafted (session-brick behavior): a deterministic 400 should offer to strip the offending message from history instead of re-failing forever.
### What Should Happen?
CC should be able to absorb the image and chat about it.
### Error Messages/Logs
```shell
See report above
```
### Steps to Reproduce
See report above
### Claude Model
Other
### Is this a regression?
I don't know
### Last Working Version
I don't know
### Claude Code Version
Claude Code v2.1.252
### Platform
Other
### Operating System
macOS
### Terminal/Shell
Terminal.app (macOS)
### Additional Information
Nope. Thought you should know. Doubt if you care...but your user community might!
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
No source file or test is named. Start by reproducing the unsupported-image 400 with Ollama's glm-5.3:cloud model, then inspect the session transcript path and the Esc Esc rewind behavior described in the report. Done means a deterministic provider rejection no longer bricks the session and the user has a recovery path without repeated failures.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- macos, ollama, python
- Ambito
- backend, cli
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100