Skip to content

fix(server): retain events while opening a thread - #273

Merged
rynfar merged 4 commits into
pylonfrom
upstream/2026-09-05-thread-subscription
Sep 6, 2026
Merged

fix(server): retain events while opening a thread#273
rynfar merged 4 commits into
pylonfrom
upstream/2026-09-05-thread-subscription

Conversation

@rynfar

@rynfar rynfar commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

Opening a thread can miss events published while its initial snapshot loads, making a running agent appear stalled. Start the live subscription consumer immediately, before reading the snapshot.

Adopts upstream #9521 (9c9ae3dc0e). Applies to every provider and client connection mode without changing Pylon's admission or Prime recovery logic. Records the partial adoption in the upstream ledger.

Validation: all 154 server-router tests, server typecheck, formatting and targeted lint pass. The regression fails with the original startup and passes with the fix; it waits on the synchronization marker instead of a sleep.

CI exposed a Pylon legacy-client fixture that assumed the old subscription scheduling. Its live events now wait for the client synchronization receipt, preserving the rollback-filter assertion without timing assumptions.

The durable implementation and review record is consolidated in companion #279.

Model: GPT-6 Astra. Harness: Codex.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S labels Sep 6, 2026
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

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 +6 B (+0.0%) 15.1 KiB
Codex Thread snapshot wire 7.1 KiB 7.1 KiB −1 B (−0.0%) 7.3 KiB
Codex Live turn WebSocket wire 6.5 KiB 6.5 KiB +7 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.6 KiB 13.6 KiB −13 B (−0.1%) 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.6 KiB 6.6 KiB −5 B (−0.1%) 7.8 KiB
Claude Live turn WebSocket decoded 57.3 KiB 57.3 KiB 0 B (0.0%) 66.4 KiB
Claude Live turn messages 8 8 0 (0.0%) 21

Baseline: de8d090 · PR result: 9f6b117 · 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 force-pushed the upstream/2026-09-05-thread-subscription branch from 22f3642 to 9f6b117 Compare September 6, 2026 02:32
@github-actions github-actions Bot added size:XS and removed size:S labels Sep 6, 2026
@rynfar
rynfar merged commit 0ef8fe6 into pylon Sep 6, 2026
18 checks passed
@rynfar
rynfar deleted the upstream/2026-09-05-thread-subscription branch September 6, 2026 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 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.

2 participants