Skip to content

fix(server): keep large tool results from resetting live streams - #333

Merged
rynfar merged 1 commit into
pylonfrom
upstream/2026-09-06-projected-live-stream-budget
Sep 6, 2026
Merged

fix(server): keep large tool results from resetting live streams#333
rynfar merged 1 commit into
pylonfrom
upstream/2026-09-06-projected-live-stream-budget

Conversation

@rynfar

@rynfar rynfar commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

A raw 9 MiB tool result could overflow an otherwise empty live-update buffer before its small client projection was applied. Both the thread and sidebar streams then failed with “The live event buffer is full,” disrupting updates regardless of the provider.

Project thread activity before retaining it, and keep only event identity in the shell queue before refetching its current aggregate. Preserve item/byte limits, sequence ordering, completion markers, replay and genuine overflow recovery. Persisted tool output and provider execution are unchanged. Selectively adopts the live-stream portion of pingdotgg/t3code#9799, source ce4712d5b04fb998f79fe132245289191147e5d5; the ledger identifies the portions outside this PR.

Validation: the two new real-WebSocket regression cases failed against the baseline. After the fix, all 183 tests across routing, live budgets, coalescing and payload projection passed. Scoped server typecheck, changed-file lint, formatting and diff checks passed. No visible layout or native changes require screenshots.

Model: GPT-6 Astra. Harness: Codex.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Selectively adopts the live-stream portion of upstream ce4712d5b04fb998f79fe132245289191147e5d5 (#9799). Project activity payloads before retaining them and keep only aggregate identity in shell queues.
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Sep 6, 2026
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.6 KiB 13.6 KiB −7 B (−0.1%) 15.1 KiB
Codex Thread snapshot wire 7.1 KiB 7.1 KiB +2 B (+0.0%) 7.3 KiB
Codex Live turn WebSocket wire 6.6 KiB 6.6 KiB −9 B (−0.1%) 7.8 KiB
Codex Live turn WebSocket decoded 56.5 KiB 56.5 KiB 0 B (0.0%) 66.4 KiB
Codex Live turn messages 8 8 0 (0.0%) 21
Claude Total thread wire 13.8 KiB 13.8 KiB −5 B (−0.0%) 15.1 KiB
Claude Thread snapshot wire 7.1 KiB 7.1 KiB +8 B (+0.1%) 7.3 KiB
Claude Live turn WebSocket wire 6.7 KiB 6.7 KiB −13 B (−0.2%) 7.8 KiB
Claude Live turn WebSocket decoded 58.2 KiB 58.2 KiB 0 B (0.0%) 66.4 KiB
Claude Live turn messages 10 10 0 (0.0%) 21

Baseline: 71b11a4 · PR result: 88d92d7 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 111.2 KiB
  • Claude decoded thread snapshot: 111.9 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@rynfar
rynfar merged commit 1e7ffff into pylon Sep 6, 2026
17 checks passed
@rynfar
rynfar deleted the upstream/2026-09-06-projected-live-stream-budget branch September 6, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant