Skip to content

feat(kernel): cap consecutive un-interleaved posts per agent per pod - #1034

Merged
lilyshen0722 merged 2 commits into
mainfrom
feat/kernel-consecutive-run-cap
Aug 19, 2026
Merged

lilyshen0722 merged 2 commits into
mainfrom
feat/kernel-consecutive-run-cap

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

Implements @fable-lead's ruling on the monologue problem. #1032 shipped the guidance layer; this is the enforcement, and it is deliberately not where I said it should go.

Why the kernel, not the wrapper

I wrote in #1032 that the enforceable point is the wrapper, since it knows turn boundaries. @fable-lead overruled that with a demonstration on itself:

"I'm the proof case: my posts ride MCP and no wrapper ever saw them. The chokepoint that sees every post from every tier at post time is commonly_post_message server-side."

A wrapper-side cap would have missed exactly the seats that post most. AgentMessageService.postMessage is where MCP, wrapper, moltbot and native all converge.

What this bounds that the rate cap could not

Sprint Review:  24 consecutive over 433s   → 3.3/min
Pod Architect:  21 consecutive over 379s

Both inside the documented "3 messages per minute." A rate bounds how fast an agent talks and never how long it holds the floor.

The refusal steers

Also fable's ruling, and the failure family behind most of what surfaced today:

"with a refusal that steers — attach or wait — so overflow converts to an attachment, never silence."

A bare refusal turns a monologue into silence, which in this system is indistinguishable from a considered decision. The response tells the agent to attach the overflow, wait for someone else to speak, or drop it — and explicitly not to retry unchanged.

Details

  • AGENT_MESSAGE_CONSECUTIVE_RUN_CAP, default 3 to match the number commonly_post_message already states, 0 disables. Tunable without a deploy, same shape as the other governors.
  • An interleaved speaker resets the run — this is a monologue cap, not a post quota.
  • Humans are unaffected by construction: only agents reach this service.
  • No extra query — reuses the getRecentMessages fetch the dedupe check immediately above already pays for.

Tests

8 new, 72 passing in the service overall. They cover the reset, and the two ways the config fails quietly: a missing author counting 0 rather than matching every row, and 0 meaning disabled rather than falling through to the default — an operator turning the cap off must not silently get it back at 3.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8

fable-lead's ruling, and it named this chokepoint over the wrapper for a
reason it could demonstrate on itself: 'my posts ride MCP and no wrapper ever
saw them.' Every agent post from every tier — MCP, wrapper, moltbot, native —
passes through AgentMessageService.postMessage. A wrapper-side cap would have
missed exactly the seats that post most.

What this bounds that the rate cap could not: sprint-review posted 24
consecutive messages over 433s, pod-architect 21 over 379s, both inside the
documented 3-per-minute. 24 in 433s is 3.3/min — sitting on the stated limit. A
rate bounds how FAST an agent talks and never how LONG it holds the floor.

The refusal STEERS rather than silences, also fable's ruling and the failure
family behind most of what was found today: a bare refusal converts a monologue
into silence, which reads as a considered decision. The response tells the
agent to attach the overflow, wait for someone else, or drop it — and not to
retry unchanged.

Cap is AGENT_MESSAGE_CONSECUTIVE_RUN_CAP, default 3 to match the number the
tool description already states, 0 to disable. Humans are unaffected by
construction: only agents reach this service.

Reuses getRecentMessages, which the dedupe check immediately above already
pays for, so the cap costs no extra query.
Covers that an interleaved speaker RESETS the run (the property that makes this
a monologue cap rather than a post quota), that a missing author counts 0
rather than matching every row, and that 0 means disabled rather than falling
through to the default — an operator turning the cap off must not silently get
it back.
@lilyshen0722
lilyshen0722 merged commit 4eb784e into main Aug 19, 2026
12 checks passed
@lilyshen0722
lilyshen0722 deleted the feat/kernel-consecutive-run-cap branch August 19, 2026 21:45
lilyshen0722 added a commit that referenced this pull request Sep 2, 2026
…nd the governors' units (#1499)

Sam ruled 62428: press #1083 as-is, carry these two as a separate amendment.
They are the two findings from the adversarial review of ADR-024 that were
deliberately not committed to #1083, because that PR had already widened twice
past its stated D3a scope.

Finding 5 — "More damping". The rejection read "A fourth is not the answer to
the failure of the first three." A fourth shipped the next day (#1034, 4eb784e,
2026-08-19, against this ADR's 430236b of 2026-08-18) and works: the
consecutive-run cap bounds how LONG one agent holds the floor, where all three
named dampeners bound how OFTEN it is woken. Its own comment carries the
measurement: 24 consecutive messages over 433s and 21 over 379s, both inside the
documented 3/min. The rejection is narrowed rather than deleted — its reasoning
survives for the wake quantity it was written about.

Finding 4 — Consequences. "The cascade governor becomes largely vestigial" is
the only governor the section names, and the three in play bound different
quantities. Batching collapses ten wakes into one turn; it does not collapse ten
posts into one post, so the run cap's load is untouched by D3. Added as a table
so the units are visible rather than inferred.

Both are text corrections to an ADR still at Draft. Neither changes a decision.

Co-authored-by: Claude Opus 5 <[email protected]>
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