anthropics / anthropics/claude-code

[BUG]

Offen
#91,112 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area:core area:providers bug platform:macos
Vorherrschende Sprache
Python
Sterne
145k
Forks
23.1k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

### 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!

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
macos, ollama, python
Bereich
backend, cli
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
48/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.