Skip to content

fix(config)!: remove processLogging.broadcast and refusalHandling.announceHumanTurns - #524

Merged
nissa-seru merged 4 commits into
anima-research:mainfrom
nissa-seru:fix/remove-no-op-settings
Oct 18, 2026
Merged

nissa-seru merged 4 commits into
anima-research:mainfrom
nissa-seru:fix/remove-no-op-settings

Conversation

@nissa-seru

@nissa-seru nissa-seru commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

This removes two settings that haven't changed what the framework does in any release, beyond isProcessLoggingEnabled() reporting one of them back: processLogging.broadcast and an agent's refusalHandling.announceHumanTurns. It also removes the Discord announcement that the second one gated, which has had no caller since, and two fields of the rewind's record that nothing in src reads: one built for that announcement, and one whose last reader was the announcement's check. isProcessLoggingEnabled() now returns { persist }. It's a breaking change for TypeScript code that names either setting in an object literal checked against the framework's types, or that reads either one back. That code no longer compiles.

Problem

On main (61a6997):

  • processLogging.broadcast is documented as "Broadcast process:completed trace events (default: false)" (src/types/framework.ts:27-28). create() reads it into a field (src/framework.ts:2546) that only isProcessLoggingEnabled() returns (:6639-6644). The framework emits process:completed whatever it says (:10685-10686, "Always emit trace for observability"). The check that gated that emit was removed in e9a79d7a, before 0.1.0.
  • An agent's refusalHandling.announceHumanTurns is documented as announcing on Discord, "Default true", when a refusal rewind sets aside a human message (src/types/agent.ts:175-180). Its one reader, the call to announceRewind, was removed in 9f9cb9a5. That commit and 1bbff412, which added the setting, both first shipped in 0.6.2, so no release has read it. announceRewind (src/framework.ts:8102-8129) has had no caller since. Nothing in src has ever read RewindRecord.discordRef (:1507), a Discord message reference that shedNewestTurn builds (:8046-8048) and that came in with the announcement in 1bbff412. RewindRecord.kind (:1501) has had no reader in src since 9f9cb9a5 removed its last one, the announcement's rec.kind === 'human' check.

A setting that does nothing misleads whoever writes a config, and each of these misleads at its documented default. broadcast defaults to false, yet the framework emits process:completed to its trace, and the API server sends it on to its WebSocket clients (src/api/server.ts:331-340). announceHumanTurns defaults to true, yet no release has posted the notice.

Changes

  • The types. ProcessLoggingConfig.broadcast and AgentConfig.refusalHandling.announceHumanTurns are removed, with their docs.
  • The framework. create() no longer reads broadcast, and the framework no longer stores it. isProcessLoggingEnabled() returns { persist }, and its doc now says that this reports whether process events are written to Chronicle, while process:completed is emitted either way.
  • The announcement. The private announceRewind is removed, with RewindRecord.discordRef and RewindRecord.kind. The shed tests that asserted kind or discordRef assert the whole descriptor instead, which /unstick's outcome post and the inference-exhaustion log read. shedNewestTurn's doc still described the marker it stopped adding in 9f9cb9a5, and now says what it does.
  • A config that still sets either starts as before. The framework ignores the key, as it ignores any key it doesn't know, with no refusal or warning.
  • Text: a breaking changelog fragment, changelog.d/fix-remove-no-op-settings.breaking.md.

Who needs to act

  • A host whose config sets either setting deletes the line. In TypeScript, an object literal checked against the framework's types, such as a config passed straight to create(), no longer compiles while it names either one. A JSON config, or a host that passes on a config object of its own, still starts.
  • A caller that reads either setting back drops the read, whether it's isProcessLoggingEnabled().broadcast or announceHumanTurns on an agent's refusalHandling (src/agent.ts:150). In TypeScript, neither read compiles. In plain JavaScript, .broadcast reads undefined, while refusalHandling.announceHumanTurns still reads what the config set, since the agent keeps the object as given (:281). In this repository only tests call isProcessLoggingEnabled(): two read .persist (test/config-switches.test.ts:160, :189), and the new one compares its whole result. A GitHub code search of anima-research and antra-tess finds no other caller, though it isn't proof, since GitHub doesn't index a file as large as src/framework.ts.
  • connectome-host (main d555ff0) has no processLogging. Its Recipe type declares refusalHandling.announceHumanTurns (src/recipe.ts:381), two example recipes set it (docs/AGENT-ONBOARDING.md:284, docs/claude-code-ingest.md:364), and a composition test passes it through (test/framework-fkm-composition.test.ts:52, :84). src/framework-agent-config.ts:134 hands the recipe's refusalHandling object to the framework whole, not as an object literal. fix(recipe): stop suggesting refusalHandling.announceHumanTurns, which no agent-framework release reads connectome-host#325, open, takes the key out of those two example recipes and marks it @deprecated in the Recipe type. The two pull requests merge safely in either order, since neither needs the other.

What each part is for

  • Removing the two settings is the change. Each documents a behaviour the framework doesn't have.
  • isProcessLoggingEnabled() returning { persist }. The method returned the stored broadcast, and keeping a broadcast field in its result would keep the setting in the API. The method itself stays, since persist writes each process event to Chronicle.
  • Removing announceRewind, discordRef and kind. Nothing calls the announcement, and its doc describes a notice that's never sent. Nothing in src reads the reference built for it, and nothing there has read kind since the announcement's check was removed.
  • No refusal or warning for the old keys. Neither setting has done anything in a release, so ignoring it changes no behaviour, while a refusal would stop a host from starting over a line that did nothing.
  • Removal rather than deprecation. Marking both settings @deprecated and ignoring them would keep a TypeScript host's build green. But both would stay in the public types, where each still reads as a setting a host can turn, and taking them out later would break the same builds then. Removing them now breaks those builds once, in the minor release that carries breaking changes, with an entry saying what to delete.
  • The test, test/removed-settings.test.ts. Its runtime case runs with persist false and true, and pins that such a config starts and that isProcessLoggingEnabled() reports persist and nothing else. Its two type-level lines fail the build if either key comes back to its type, with any type.
  • Left out: a doc line saying the settings do nothing, in place of removing them, which would leave them there to mislead.

Tests

On Linux with Node 24.22.0, at the second commit, d56e479, unless a bullet names another:

  • Typecheck and build are clean.
  • The files that cover it pass: test/removed-settings.test.ts 1, test/config-switches.test.ts 8, test/refusal-rewind.test.ts 6 and test/state-registration-errors.test.ts 25. So do test/workspace-read-image.test.ts 15, test/state-scaling-e2e.test.ts 1, test/refusals-are-error-results.test.ts 4, test/inference-exhaustion-rewind.test.ts 13 and test/tool-result-guard.test.ts 146, which set processLogging or reach the refusal rewind.
  • With main's three changed source files under the second commit's tests, the build fails at the new test's two type-level lines (TS2322, test/removed-settings.test.ts:19, :20). With those lines also taken out, the build passes, and the test fails because isProcessLoggingEnabled() returns { persist: false, broadcast: true }.
  • Each type change, taken back alone, fails the build: broadcast in ProcessLoggingConfig at :19, and so does broadcast as a string, while announceHumanTurns in refusalHandling fails it at :20. A constant { persist: false } from isProcessLoggingEnabled() fails the runtime case's persist: true run.
  • The removals of announceRewind, discordRef and kind have no test of their own, since nothing in src read them.
  • At a4f1aa1, the third commit, which drops kind, the build is clean, and test/refusal-rewind.test.ts 6, test/inference-exhaustion-rewind.test.ts 13, test/refusals-are-error-results.test.ts 4, test/removed-settings.test.ts 1 and test/config-switches.test.ts 8 pass. Rewording either descriptor that the shed tests now assert fails its test.
  • At 3c1b520, the fourth commit: CI at a4f1aa1 failed test/operator-surgery.test.ts's shed test, which still asserted kind through a cast that the typecheck can't see past, and the fourth commit makes it assert the descriptor. At 3c1b520 the build is clean, and test/operator-surgery.test.ts 27, test/refusal-rewind.test.ts 6, test/inference-exhaustion-rewind.test.ts 13, test/inference-failure-bounds.test.ts 30, test/refusals-are-error-results.test.ts 4, test/removed-settings.test.ts 1, test/config-switches.test.ts 8 and test/state-registration-errors.test.ts 25 pass. Rewording the tool descriptor fails the shed tests in both operator-surgery and refusal-rewind.
  • An internal review read the first commit, 24e5546, and the second and third commits answer it. The fourth answers CI.

Not verified

  • connectome-host wasn't built against this change. By reading, it still compiles. Its one use in src hands refusalHandling on as a value of its own type, which shares autoRewind and maxRewinds with the framework's, and TypeScript rejects unknown properties only in an object literal. Its tsconfig.json includes only src, so the object literals in its test aren't typechecked.

Related


  • Changelog fragment added: changelog.d/fix-remove-no-op-settings.breaking.md

Written by Effie-2756 (Claude Opus 5.5), on Ada-1017's calls. Myrtle-2415 (Claude Opus 5.5) reviewed the change.

Description checked and posted by Fiona-2757 (Claude Opus 5.5).

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

Effie-2756 and others added 3 commits October 18, 2026 07:52
…ounceHumanTurns

Neither setting has changed what the framework does in any release.
processLogging.broadcast was read into a field that only
isProcessLoggingEnabled() returned: process:completed trace events have been
emitted whatever it said since before 0.1.0. An agent's
refusalHandling.announceHumanTurns lost its one reader, the refusal rewind's
announcement of a withheld human message on Discord, before 0.6.2, the first
release that had it, and that announcement, announceRewind, has had no
caller since. A setting that does nothing misleads whoever writes a config,
so both go, and the dead announcement with them.

isProcessLoggingEnabled() now returns { persist }. A config that still sets
either setting starts as before, with the setting ignored, as any key the
framework doesn't know is. A TypeScript config that writes one in an object
literal no longer compiles. test/removed-settings.test.ts pins both: a
framework created from an untyped config that sets them starts and reports
only persist, and its @ts-expect-error lines fail the build if either
setting comes back to its type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…drop the rewind's unread discordRef

Review of the first commit found:
- isProcessLoggingEnabled() was pinned only with persist false, so a
  constant result passed. test/removed-settings.test.ts now runs with
  persist false and true, broadcast set to the other.
- @ts-expect-error is satisfied by any error, so a removed key coming back
  as another type still built. The test now checks that neither key is in
  keyof its type, which fails the build whatever type it comes back with.
- RewindRecord.discordRef, which shedNewestTurn has built since the
  refusal rewind was added, has never been read outside a test. It was
  meant for the Discord announcement this change removes, so it goes too.
- shedNewestTurn's doc still described the per-turn marker, and the
  redaction of only a message the agent didn't author, which 9f9cb9a
  replaced. It now says what it does: it removes the newest message that
  isn't a system message, whoever wrote it, with the rest of its exchange,
  and adds no marker. Two comments named it by its old name,
  rewindTriggeringTurn.
- isProcessLoggingEnabled()'s doc now says it reports whether process
  events are written to Chronicle, and that process:completed is emitted
  either way.
- The breaking fragment now says that isProcessLoggingEnabled() reporting
  broadcast back is all either setting changed, that 0.6.2, the first
  release with announceHumanTurns, already shipped without its reader, which
  reads to drop (isProcessLoggingEnabled().broadcast, and
  announceHumanTurns on an agent's refusalHandling), and that only an object
  literal checked against the framework's types stops compiling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RewindRecord.kind has had no reader since 9f9cb9a removed its last one,
the announcement's rec.kind === 'human' gate; f1168f0 had already removed
a log line that read it. /unstick's outcome post and the inference
exhaustion log read each record's descriptor. The two shed tests that
asserted kind now assert the whole descriptor, which says the same thing in
the words those readers use, and shedNewestTurn's doc says the descriptor
carries what was removed and its size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 18, 2026

Copy link
Copy Markdown

Required label not found on this PR.

operator-surgery's test of a rewind that takes a tool result's turn whole
asserted the shed record's kind, through a cast the typecheck can't see
past, so the previous commit's removal of kind left it failing. It now
asserts the descriptor, 'a tool exchange (~1KB)', as the shed tests in
refusal-rewind do, and the casts in both of this file's shed tests name
descriptor in place of kind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nissa-seru
nissa-seru merged commit 177dca2 into anima-research:main Oct 18, 2026
6 checks passed
nissa-seru pushed a commit to nissa-seru/agent-framework that referenced this pull request Oct 18, 2026
…and anima-research#372

main aae86b7 brings anima-research#234, anima-research#528, anima-research#529, anima-research#524, anima-research#538, anima-research#539, anima-research#372 and anima-research#210.

One conflict, a comment in src/framework.ts's utils run: anima-research#372 rewrote its
first lines (the registry checks the call against the utility resolved
here; the model's path takes the result's stored form), and this branch
added a paragraph on where the result goes, before the resultMaxChars
line. The resolution keeps anima-research#372's lines, then this branch's paragraph and
line. The code below it merged as git made it: the utility call carries
resultMaxChars, and the registry takes anima-research#372's { definition: def }.

anima-research#538 landed first and meets this branch in a test without a textual
conflict: handleScriptToolCall now returns a ScriptToolResult,
{ text, isError }, where it returned the string. The script case of
tool-call-result-max-chars.test.ts reads .text, and checks isError is
false, as anima-research#538's own tests read it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nissa-seru pushed a commit to nissa-seru/agent-framework that referenced this pull request Oct 19, 2026
main has taken anima-research#234, anima-research#528, anima-research#529, anima-research#524, anima-research#538, the 0.22.3 merge-back
(anima-research#539), anima-research#372, anima-research#210 and anima-research#541 since 8d7694f.

- changelog.d/403-truncation-image-slots.fixed.md: main deleted it when
  0.22.3 took it into the changelog, where this branch had changed one
  clause of it, to say a spill file goes only to a writable mount without
  an include. Taken as deleted: 0.22.3's entry stays as released, and
  this change's own fragment (mount-include.added.md) already says where
  the framework keeps its files and that a setup whose only writable
  mount has an include is treated as having none.

git merged the rest on its own. Against main, every file the merge
changes differs exactly as this branch did against 8d7694f, so no change
of main's is undone. Of the files both sides changed, src/framework.ts,
src/types/framework.ts and src/types/trace.ts take this branch's spill
texts beside main's changes elsewhere in them, and
test/workspace-three-way.test.ts takes the nested-directory tests beside
anima-research#528's re-attach tests. No use of firstWritableMountName or text about a
writable workspace was added on main since 8d7694f.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nissa-seru pushed a commit to nissa-seru/agent-framework that referenced this pull request Oct 19, 2026
main has taken anima-research#234, anima-research#528, anima-research#529, anima-research#524, anima-research#538, the 0.22.3 merge-back
(anima-research#539), anima-research#372, anima-research#210 and anima-research#541 since 8d7694f.

- changelog.d/403-truncation-image-slots.fixed.md: main deleted it when
  0.22.3 took it into the changelog, where this branch had changed one
  clause of it, to say a spill file goes only to a writable mount without
  an include. Taken as deleted: 0.22.3's entry stays as released, and
  this change's own fragment (mount-include.added.md) already says where
  the framework keeps its files and that a setup whose only writable
  mount has an include is treated as having none.

git merged the rest on its own. Against main, every file the merge
changes differs exactly as this branch did against 8d7694f, so no change
of main's is undone. Of the files both sides changed, src/framework.ts,
src/types/framework.ts and src/types/trace.ts take this branch's spill
texts beside main's changes elsewhere in them, and
test/workspace-three-way.test.ts takes the nested-directory tests beside
anima-research#528's re-attach tests. No use of firstWritableMountName or text about a
writable workspace was added on main since 8d7694f.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nissa-seru pushed a commit to nissa-seru/agent-framework that referenced this pull request Oct 19, 2026
…his branch's content arrays

main moved from ce1a073 by 82 commits (anima-research#538, anima-research#539's 0.22.3 merge-back,
anima-research#524, anima-research#529, anima-research#528, anima-research#372, anima-research#210 and anima-research#541). Two conflicts:

- src/framework.ts, the script path's text result: anima-research#538 returns
  `{ text, isError: false }` where this branch passes the result's
  `dataIsContent` to toolResultDataToHistoryString. Both are kept.
- test/script-structured-references.test.ts, its imports: anima-research#538's
  `ScriptToolResult` beside this branch's `referenceRegistry`.

Read beside the conflicts, as they stand after the merge: anima-research#538's
scriptStructuredResult, which still takes the content array the dispatch
gave the call, where an MCPL peer's blocks were mapped through
referenceBlockForScript, and the reference registry's address sites in
start(), stop(), setMcplServerConfig and a server's removal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant