Skip to content

fix(prime): retain safe session closure diagnostics - #607

Merged
rynfar merged 4 commits into
pylonfrom
fix/prime-session-closure-diagnostics
Sep 18, 2026
Merged

rynfar merged 4 commits into
pylonfrom
fix/prime-session-closure-diagnostics

Conversation

@rynfar

@rynfar rynfar commented Sep 17, 2026 •

Copy link
Copy Markdown
Collaborator

Unexpected Prime session closures were reduced to a generic “stopped before sending a final response” error, leaving no safe way to distinguish provider closure from internal proof, capacity, snapshot, or MCP recovery failures.

Record a bounded internal closure classification and generation metadata in provider event logs. Ignore classifications supplied by raw provider events, retain private-error redaction, and preserve existing terminal behavior and recovery fences. This is diagnostic instrumentation: the historical incident could not be reproduced or assigned a proven root cause from the available logs.

Validation: 574 tests across the four focused Prime daemon runtime, adapter, and event suites; scoped lint; server typecheck (existing Effect suggestions only); diff whitespace check. Includes regression coverage for private-error suppression, untrusted diagnostic fields, and internally synthesized recovery failures. No client or wire changes.

Implemented through Pylon delegation by Antigravity (gemini-3.8-flash-high); reviewed, corrected, and verified by GPT-6 in the Codex harness.


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

@vercel

vercel Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
pylon-marketing Ready Ready Preview Sep 17, 2026 7:15pm UTC

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

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.9 KiB 14.0 KiB +30 B (+0.2%) 15.1 KiB ✅
Codex Thread snapshot wire 7.2 KiB 7.2 KiB +9 B (+0.1%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.7 KiB 6.8 KiB +21 B (+0.3%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 58.0 KiB 58.0 KiB +44 B (+0.1%) 66.4 KiB ✅
Codex Live turn messages 9 10 +1 (+11.1%) 21 ✅
Claude Total thread wire 14.0 KiB 14.0 KiB +12 B (+0.1%) 15.1 KiB ✅
Claude Thread snapshot wire 7.2 KiB 7.2 KiB −7 B (−0.1%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.8 KiB 6.8 KiB +19 B (+0.3%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 58.9 KiB 58.9 KiB +44 B (+0.1%) 66.4 KiB ✅
Claude Live turn messages 9 10 +1 (+11.1%) 21 ✅

Baseline: ad33250 · PR result: 3a92c40 · 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: 115.6 KiB
  • Claude decoded thread snapshot: 116.3 KiB

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

@rynfar
rynfar merged commit 3378d65 into pylon Sep 18, 2026
19 checks passed
@rynfar
rynfar deleted the fix/prime-session-closure-diagnostics branch September 18, 2026 02:23

This branch was successfully deployed

1 active deployment
Preview — 3a92c40a Deployed Sep 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 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