Skip to content

bug: turn ending with content-filter finish reason stops silently #31744

Closed

Description

@kkdawkins

Description

When a provider ends a turn with a content filter (e.g. Anthropic stop_reason: refusal, which the protocol layer maps to the content-filter finish reason), the assistant message records the finish reason but no error is attached. If the turn produced no visible output (only empty reasoning + finish), the session goes idle with nothing rendered — it looks like opencode just stopped responding.

Hit this 3 times in one session on an ordinary code-review task with an Anthropic model. Related but distinct from #30411 (that one is empty turns under context pressure; this is specifically the content-filter finish path).

Plugins

none

OpenCode version

1.17.3

Steps to reproduce

  1. Run a prompt where the provider's safety classifier fires (Anthropic returns stop_reason: refusal)
  2. The turn ends with finish reason content-filter and no text/tool parts
  3. Session goes idle with no error box, no notification, nothing visible

Operating System

macOS

Terminal

Ghostty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions