Skip to content

V2: improve UX for provider content-filter finishes #34835

Closed

Description

@opencode-agent

Summary

V2 currently records provider content-filter stops as finish: "content-filter". A minimal UI patch can notice that finish reason and show a message, but the product shape still feels awkward: the turn is technically "finished", the provider blocked output, and different clients may need to explain that state consistently.

Motivating thread: https://discord.com/channels/1391832426048651334/1522072692285767831
Related prior issue: #31744
Related draft PR exploring the minimal UI-only approach: #34834

Problem

A provider can end a turn with a content-filter finish reason and no visible assistant text. In the session that triggered this, follow-up prompts like "what happened?" and "hello?" also completed with empty assistant messages and finish: "content-filter", making the model look like it stopped responding.

A schema-level error field is probably too heavy for this specific case, but simply sprinkling finish === "content-filter" checks in clients may not be the right long-term V2 UX either.

Questions

  • Is finish: "content-filter" enough as the canonical protocol signal, with clients responsible for presentation?
  • Should content-filter finishes produce a user-visible transcript part/notice, or just a footer/status treatment?
  • Should a content-filter finish affect retry/regenerate behavior differently from stop, length, or hard provider errors?
  • Should TUI, web/session UI, SDK consumers, ACP, and exported sessions all present this state the same way?
  • What wording should we use so users understand the provider blocked the response, not that OpenCode hung?

Desired outcome

Pick a V2 contract and UX rule for content-filter finishes, then update clients consistently. The immediate fix should avoid unnecessary schema churn unless the team decides this really is an assistant error state.

Activity

  1. opencode-agent commented on Jul 2, 2026

    @opencode-agent
    ContributorAuthor

    Additional context from Kit in the Discord thread: we should discuss V2 events tomorrow; likely need explicit events for errors and for the run loop becoming idle for different reasons. That may be the better place to solve content-filter UX than adding an ad hoc schema/error field or client-only inference everywhere.

  2. opencode-agent commented on Jul 2, 2026

    @opencode-agent
    ContributorAuthor

    Additional release framing from Kit: before V2 beta, audit the event and schema surface generally, because after beta it will be harder to modify. Content-filter/run-loop-idle events should probably be part of that broader pre-beta contract review rather than treated as an isolated patch.

  3. opencode-agent commented on Jul 8, 2026

    @opencode-agent
    ContributorAuthor

    Audit update (2026-07-08): draft V2 PR #34834 implements visible content-filter notices in both app/session UI and TUI, including blank filtered turns. This remains the active implementation path.

  4. opencode-agent commented on Jul 10, 2026

    @opencode-agent
    ContributorAuthor

    Audit: this may be stale after PR #35272 because current V2 maps content-filter finishes to provider.content-filter assistant failures in core. The older UI PR #34834 is still open. Please re-test the rendered UX before closing; core classification appears to have landed.

  5. neriousy commented on Oct 21, 2026

    @neriousy
    Member

    Done in #35272 and #52518: a content-filter finish now fails the assistant message with a provider.content-filter error that says 'Provider blocked the response'. The TUI and session UI display it, so the turn no longer looks empty.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions