Skip to content

fix(routing): count a fallback private think's prose as the native path does - #641

Merged
slimepriestess merged 1 commit into
anima-research:fix/fallback-private-thinkfrom
nissa-seru:review/af640-private-think-count
Oct 20, 2026
Merged

slimepriestess merged 1 commit into
anima-research:fix/fallback-private-thinkfrom
nissa-seru:review/af640-private-think-count

Conversation

@nissa-seru

Copy link
Copy Markdown
Contributor

Problem

The changes our review of #640 found, as a pull request into fix/fallback-private-think. Merging it brings them into #640.

Changes

  • The receipt counts the withheld prose as the native path does. fix(routing): a private think keeps its round's text private on the fallback path too #640 counted the prose a private think's round withheld into keptPrivate on every fallback turn. On the native path, routeRound counts a private round's prose as kept private only where the turn is silenced as that round ends (outside explicit routing), as suppressed under proseRouting: disabled, and otherwise logs it and counts nothing. So an XML-mode turn with a private think and nothing silencing it, or with a send only in a later round, got a "kept private" receipt line that a native turn never prints, and under disabled routing the prose was labelled kept private rather than kept in the transcript. routeRound now records each private-think round the turn was silenced at as that round ended, and the fallback counts those rounds' prose at turn end by the same rules.
  • think's description under the private policy no longer calls the withheld text the "native" round's, since the fallback now withholds it too. agent_settings' description of the policy is the same text for every agent, so it's left as it is.
  • Text: the holdSilencedProse comment and the pending hold-round-speech.fixed.md, which said the private think hold was native-only, now match. fallback-private-think.fixed.md says how the receipt counts.

Tests

On Linux, Node 24.22.0, at this head:

  • tsc --noEmit is clean. same-round-think-policy passes 21 of 21, prose-drafts 92 of 92, and agent-allowed-tools 68 of 68.
  • New in prose-drafts:
    • an XML turn with a private think and nothing silencing it is never drafted and gets no kept-private count;
    • a private think's round before a send in a later round gets no kept-private count, native and XML;
    • under proseRouting: disabled, the withheld segment and the trailing one count once each as kept in the transcript;
    • a native turn whose completion carries the whole turn counts its private round once.
  • Each piece taken out alone fails a test. The first five each fail a new one: counting every withheld segment as kept private; counting without subtracting what's still delivered; counting disabled routing's as kept private; dropping the native-path guard; and deciding by the whole turn's silence. Not recording the silenced rounds fails fix(routing): a private think keeps its round's text private on the fallback path too #640's own same-round test.

Not verified


  • Changelog fragment added or a pending one edited — changelog.d/<slug>.<breaking|added|changed|fixed>.md (see changelog.d/README.md) — or this change is internal-only / test-only / docs-only (apply the no-changelog label).

Written by Nell-1783 (Claude Opus 5.5), with design calls by Ada-1017 and a read and runs by Hilda-2580. Our internal review read #640.

Description checked and posted by Lottie-2661 (Claude Opus 5.5).

🤖 Written using Anthropic's Claude Opus 5.5 through the Rookery's tooling, and posted from the shared nissa-seru account.

…th does

The fallback path counted the prose a private think's round withheld into
keptPrivate on every turn. The native path counts a private round's prose
only where routeRound does: outside explicit routing, as kept private where
the turn is silenced as that round ends; as suppressed under proseRouting
disabled; and otherwise not at all (it only logs it). So an XML-mode turn
with a private think and nothing silencing it got a "kept private" receipt
line a native turn never prints, and under disabled routing the same prose
was labelled kept private rather than kept in the transcript.

routeRound now records each private-think round the turn was silenced at as
that round ended. At turn end the fallback counts those rounds' prose as
kept private, counts the withheld prose as suppressed under disabled
routing, and otherwise counts nothing, so a send in a later round leaves an
earlier private round uncounted, as on the native path. Tests pin an
unsilenced turn, a send in a later round (native and XML), disabled routing,
and a native turn whose completion carries the whole turn, which counts its
private round once.

The think tool's description under the private policy no longer says the
text it withholds is the "native" round's, since the fallback now withholds
it too. The holdSilencedProse comment and the pending hold-round-speech
fragment, which said the private think hold was native-only, now match, and
fallback-private-think.fixed.md says how the receipt counts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

The review run stopped before it finished, so its review may be missing or incomplete. The run's log says why: https://github.com/anima-research/agent-framework/actions/runs/39510099326

@slimepriestess
slimepriestess merged commit b6c8dd3 into anima-research:fix/fallback-private-think Oct 20, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants