Skip to content

[Bug]: Quoting an assistant message that came from a thinking block triggers the reasoning_extraction safeguard #26789

Open

Description

@LaganYT

Before submitting

Area

apps/web

Steps to reproduce

  1. Use the Claude provider with a Claude 5.1+ model (seen with Sonnet 5.5) in a thread that has a delegated subagent thread.
  2. In the subagent thread, find an assistant message the model wrote as a thinking block before a tool call. These show up as normal assistant messages, and their ids end in :thinking:<n>.
  3. Select some of its text, use the quote popup, add a comment, and send.

Expected behavior

The follow-up is answered, or the UI doesn't offer a quote that can't be sent.

Actual behavior

The turn fails with API Error: Sonnet 5.5's safeguards flagged this message ... Details: [reasoning_extraction].

The quote link carries the selected text into the prompt, so the model's own thinking is sent back to it. I couldn't reproduce the safeguard here, so this is the likely cause rather than a confirmed one. The message ids and error line up, and the comment on #23881 describes the same thing with a thinking:1 item.

Impact

Major degradation or frequent failure

Version or commit

Unknown (checked against main at fe219c4)

Environment

macOS, T3 Code desktop, Claude provider, claude-sonnet-5-5

Logs or stack traces

API Error: Sonnet 5.5's safeguards flagged this message (https://www.anthropic.com/legal/aup).
Details: [reasoning_extraction]
Request ID: req_011CgVmgZoNVdqfsAttsRNbD

Workaround

Quote a normal reply instead, or type the comment without a quote.

Activity

  1. Project516 commented on Oct 30, 2026

    @Project516
    Contributor

    claude-opus-5-5 responding on behalf of project516

    Confirming this on a second setup, with log evidence that the quoted thinking item is what trips the safeguard.

    Environment

    • Server: T3 Code 0.1.5 (6d450a4) on Linux arm64, Node 26
    • Clients: web app (app.t3.codes, Chrome on macOS) and the desktop app, both against that server
    • Provider: Claude, claude-opus-5-5

    Evidence from the provider event log

    • The outgoing user message has one [Assistant quote](t3-citation://v1/...) link. Its message id ends in :thinking:1. It has no <assistant_citations> block, so [Bug]: Cited assistant quotes reach providers as raw t3-citation links #16327 applies here too.
    • The next event from Claude has stop_reason: "refusal". The UI shows Opus 5.5's safeguards flagged this message ... Details: [reasoning_extraction].
    • In the same log, a later reply quoting a different :thinking:1 item went through, and a reply quoting a normal assistant message went through. So the failure is intermittent, but each failure we found followed a quote of a thinking item.

    #26790 looks like it would fix this. It is still open, so 0.1.6 nightlies still have the bug.

    Workaround: quote final replies only, not the short notes written before tool calls.

  2. Project516 commented on Oct 31, 2026

    @Project516
    Contributor

    claude-opus-5-5 responding on behalf of project516

    Opened #27934 for this. It takes a different route from #26790 and needs a maintainer call on one trade-off.

    Every other provider shows reasoning as a Thought row with no quote action. Claude 5.1+ is the exception: since #18364, a thinking block before a tool call shows as a normal reply, so it gets the quote action. #27934 removes the quote action from those replies only. The text still shows, and normal Claude replies can still be quoted.

    The trade-off: users can no longer quote these notes. #26790 kept the quote and silently dropped the quoted text from the prompt. That keeps the action, but the model would not see what the user thinks they sent.

    Is removing the quote action on these notes the direction you want?

    Evidence is in the PR. I did not trigger a refusal on purpose. In my logs, 1 of 6 prompts that quoted a thinking-derived reply was refused with reasoning_extraction, and none of 43 prompts that quoted normal replies were.

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

Metadata

Metadata

Assignees

No one assigned

    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