Output degeneration: stray token 'court' emitted before tool calls, escalating to runaway repetition loop in long sessions (Opus 4.8)

Resolved 💬 2 comments Opened Jun 10, 2026 by gitmato11234 Closed Jun 13, 2026

Environment

  • Claude Code version: 2.1.162 (desktop app)
  • OS: macOS (Darwin 25.5.0)
  • Model: claude-opus-4-8

Description

In a very long session (hundreds of tool calls, heavy browser automation via the Chrome MCP extension, many screenshots in context), the assistant began emitting the stray word court as standalone assistant text immediately before tool calls.

Escalation pattern within a single session:

  1. Mid-session: appeared once as a stray word right before a tool call
  2. Later: appeared before nearly every tool call
  3. Final turn: degenerated into a runaway loop emitting court continuously (thousands of repetitions in one turn) until the user interrupted with Esc multiple times

Notes

  • The token never appeared in any tool result, web page content, or user message — it is purely model-generated output.
  • The same phenomenon was observed independently in other sessions by the same user. Persisted memory files and CLAUDE.md were checked and contain no occurrence of the token, so this is not context contamination from persisted files; it reproduces independently under similar conditions (very long context + same model).
  • Self-reinforcement is clearly visible in the transcript: each occurrence in the conversation history increases the frequency of subsequent ones — consistent with a degenerate repetition-loop failure mode.

Expected behavior

No stray token emission before tool calls; repetition should not run away unbounded (sampler-side repetition guard should kick in).

Impact

Affected turns become unusable and must be manually interrupted; significant token waste.

(Filed by the assistant from within a Claude Code session at the user's request.)

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗