Skip to content

fix(coding-agent): suppress rlm_child_update emits with an unchanged snapshot - #1944

Merged
xeophon merged 4 commits into
mainfrom
fix/relay-hygiene
Sep 1, 2026
Merged

fix(coding-agent): suppress rlm_child_update emits with an unchanged snapshot#1944
xeophon merged 4 commits into
mainfrom
fix/relay-hygiene

Conversation

@snimu

@snimu snimu commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Fixes ENG-5830 (https://linear.app/primeintellect/issue/ENG-5830/suppress-duplicate-rlm-child-update-emits).

A session running child agents emits an rlm_child_update snapshot for every streaming event a child produces — every token delta, every tool start/stop — and each ancestor re-emits its descendants' updates. The snapshot only carries coarse fields (status, activity, a 160-character answer preview, token count from the last completed message), so while a child is thinking, and once its answer preview hits the cap, consecutive snapshots are byte-for-byte identical. Every attached client still received and re-rendered each one, and in daemon mode each one was serialized to every attached socket and scheduled a roster flush.

emitChildUpdate now compares the serialized snapshot against the last one it emitted and skips exact repeats, the same way _emitQueueUpdate already deduplicates queue snapshots. Status transitions, preview growth, recap changes, and terminal updates still emit; removal signals bypass the closure entirely and are unaffected.

One test pins the behavior: repeated emits with an unchanged snapshot produce no event, and a real change produces exactly one.

Validated with the daemon/roster suites and root npm run check.

…snapshot

Child streaming re-emits the parent's child snapshot on every assistant
delta; once the answer preview caps and activity is steady, the repeats
are byte-identical and only add wire and render noise for every attached
client. Emit only when the serialized snapshot actually changed.
kernelStderr accumulated for the kernel's lifetime while every reader
takes at most the last 1 KiB; keep only an 8 KiB tail.
@snimu snimu changed the title fix(coding-agent): coalesce unchanged child-update emits and bound kernel stderr fix(coding-agent): suppress rlm_child_update emits with an unchanged snapshot Sep 1, 2026
@snimu
snimu requested a review from xeophon September 1, 2026 13:14
@xeophon
xeophon merged commit 6179a60 into main Sep 1, 2026
22 checks passed
@xeophon
xeophon deleted the fix/relay-hygiene branch September 1, 2026 13:19
olety added a commit to oneiron-dev/prime-agent that referenced this pull request Sep 1, 2026
Takes upstream's event-driven supervisor roster ledger + push (PrimeIntellect-ai#1897, PrimeIntellect-ai#1900),
direct TUI<->worker transport (ENG-5817), daemon startup/recovery hardening
(PrimeIntellect-ai#1929, PrimeIntellect-ai#1909), single-dump kernel snapshots (PrimeIntellect-ai#1945), empty-draft eviction
(PrimeIntellect-ai#1946), rlm_child_update suppression (PrimeIntellect-ai#1944), bash-skill preview (PrimeIntellect-ai#1911).

Fork laws re-expressed on the roster architecture:
- stable-target follow-up honesty kept (capability proof via worker hello,
  target_unavailable never not_found when ownership unproven)
- schema revision 26 (union of fork rev-24 stable-target + upstream
  rev-24/25 roster+transport); digest minted by the repo's own algorithm
- summary freshness reuse + single-flight + staleness + root-omission
  rejection restored on upstream's refresh pull
- adoption/recovery never fails a live worker on a slow or root-omitting
  catalog: get_state root seed + stale mark + bounded background rehydration
- repl.py keeps fork prune-on-aggregate-overflow
- delete handlers keep fork persistence reporting; eviction fence test keeps
  the stronger two-worker contention variant

Known test debt (deferred to post-Wave cleanup per owner): roster-era fixture
migrations in daemon-supervisor-monitor (2), plus un-triaged failures in
package-command-paths, agent-session-recursion, daemon-runtime-stress,
4600-supervisor-singleton, 4603-worker-recovery, 4606-update-restart-
coordinator, agents-view-roster. Production laws preserved; failures are
fixture-era artifacts or mechanism assertions to rewrite.
ketema added a commit to ketema/prime-agent that referenced this pull request Sep 1, 2026
- Direct session transport between TUI and worker (ENG-5817, PrimeIntellect-ai#1926)
- Event-driven supervisor agent roster with push subscriptions (PrimeIntellect-ai#1897, PrimeIntellect-ai#1900, PrimeIntellect-ai#1895)
- Hardened daemon startup, recovery ownership, and worker launch diagnostics (PrimeIntellect-ai#1929, PrimeIntellect-ai#1918)
- Python REPL runtime single-dump snapshots and bash preview tool (PrimeIntellect-ai#1945, PrimeIntellect-ai#1911)
- Non-blocking RLM subagent deletion and snapshot update suppression (PrimeIntellect-ai#1954, PrimeIntellect-ai#1944)
- Saved catalog loading on Agents View open (PrimeIntellect-ai#1960)
- Advanced Anthropic prompt caching marker across tool results (PrimeIntellect-ai#1927)
- TUI process replacement on update and empty draft eviction (PrimeIntellect-ai#1631, PrimeIntellect-ai#1946, PrimeIntellect-ai#1920)
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