[BUG] Assistant responses silently dropped from session store after reprimand/ethics trigger

Resolved 💬 3 comments Opened Apr 19, 2026 by laplaque Closed May 26, 2026

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)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Assistant responses are silently dropped from the session store after certain triggers. The response streams/flashes in the CLI, then vanishes. It is absent from both the UI and the on-disk JSONL session file. No assistant turn entry is written at all — consecutive user messages appear in the JSONL with no assistant turn between them.

The model retains the content in-context and can reconstruct it accurately when asked.

What Should Happen?

Every assistant response that streams to the CLI should be persisted to the session JSONL.

Error Messages/Logs

No error shown. The JSONL simply has consecutive user entries with no assistant entry between them:


type=user  "Thank you"
type=user  "Now, where were we?"
type=user  "write to the repo root what you tried to say..."
type=assistant  [Write tool — reconstructed response]


All assistant turns that *are* persisted in the same session have normal structure — `context_management: {'applied_edits': []}` present, standard `usage` fields, text blocks included. No anomalies. The dropped turns simply don't exist in the JSONL.

Steps to Reproduce

Observed trigger pattern across 3 confirmed instances:

  1. User issues a reprimand or correction (e.g. "you disobeyed the rule and went ahead and changed...")
  2. Claude acknowledges, performs tool calls — all persist normally
  3. Conversation returns to normal flow
  4. First conversational response after the reprimand is silently dropped
  5. Subsequent short conversational responses may also drop

A third occurrence was triggered by profanity in the user message → ethics rule fired → subsequent response dropped.

Not reliably reproducible on demand. All instances involved reprimand/ethics code paths followed by short conversational (no tool call) responses.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.101 (Claude Code). Persists across version upgrades — observed on earlier versions too.

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

  • Cross-checked against /export output and raw session files — data is genuinely absent, not a rendering issue.
  • The model can reconstruct the dropped response from in-memory context, confirming it was generated.
  • Confirmed across multiple terminals: iTerm2, VS Code, tmux, Wave — not terminal-specific.
  • Dropped turns are always short, conversational, no tool calls.
  • All turns during the reprimand itself persist normally — only the post-reprimand responses drop.
  • This is distinct from a separate server-side bug where an assistant entry exists but is structurally incomplete (thinking-only, no text block, anomalous usage fields). Here, no entry is written at all — a client-side persistence failure.
  • Previously possibly filed as #47657.

View original on GitHub ↗

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