anthropics / anthropics/claude-code

[BUG]

Abierto
#91,112 0 comentarios 0 reacciones 0 asignados Ver en GitHub
area:core area:providers bug platform:macos
Lenguaje dominante
Python
Estrellas
145k
Forks
23.1k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
macos, ollama, python
Área
backend, cli
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Activo
Claridad
Bastante claro
Aptitud para principiantes
48/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.