Skip to content

feat(prime): support abort_and_send_queued capability with fallback to abort - #723

Merged
rynfar merged 1 commit into
pylonfrom
feat/pylon-abort-and-send-queued
Sep 25, 2026
Merged

rynfar merged 1 commit into
pylonfrom
feat/pylon-abort-and-send-queued

Conversation

@rynfar

@rynfar rynfar commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Upstream Prime Agent added abort_and_send_queued to allow interrupting the current streaming turn while immediately pumping queued messages (PR #2426).

This PR adds preparatory runtime support for the negotiated capability abort_and_send_queued_v1. Pylon’s current user stop and cancellation paths still call abortAndClearQueue, so this PR does not yet expose send-queued behavior in the product:

  • Adds optional abortAndSendQueued to PrimeAgentDaemonConnection in PrimeAgentDaemonBridge.ts.
  • Exposes abortAndSendQueued on PrimeAgentDaemonSessionRuntime and wires abort to call connection.abortAndSendQueued() when negotiated capability abort_and_send_queued_v1 is enabled and available on the connection.
  • Preserves full backward-compatible fallback to connection.abort() when the capability is not advertised or when running against stock/older daemons.
  • Respects prompt lifecycle admission fencing and error handling invariants.

Testing

  • Unit tests added in PrimeAgentDaemonSessionRuntime.test.ts verifying:
    • Invoking abortAndSendQueued when abort_and_send_queued_v1 is negotiated.
    • Clean fallback to abort when capability is false/absent.
    • Clean fallback to abort when capability is true but method is missing.
    • Error propagation when the connection method rejects.
  • All provider test suites passing:
    • PrimeAgentDaemonBridge.test.ts (25/25 passing)
    • PrimeAgentDaemonSessionRuntime.test.ts (271/271 passing)
    • PrimeAgentDaemonAdapter.test.ts (293/293 passing)
  • pnpm --filter t3 typecheck and vp lint passed with 0 errors.

Relates to fork PR pylon-code/prime-agent#81.


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 22, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
pylon-marketing Ignored Ignored Preview Sep 22, 2026 1:04pm UTC

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S labels Sep 22, 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 +77 B (+0.5%) 15.1 KiB ✅
Codex Thread snapshot wire 7.2 KiB 7.2 KiB −4 B (−0.1%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.7 KiB 6.8 KiB +81 B (+1.2%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 58.0 KiB 58.0 KiB +88 B (+0.1%) 66.4 KiB ✅
Codex Live turn messages 8 10 +2 (+25.0%) 21 ✅
Claude Total thread wire 14.0 KiB 14.0 KiB +30 B (+0.2%) 15.1 KiB ✅
Claude Thread snapshot wire 7.2 KiB 7.2 KiB +1 B (+0.0%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.7 KiB 6.8 KiB +29 B (+0.4%) 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: 84f540c · PR result: a7fb782 · 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 ba4e8e2 into pylon Sep 25, 2026
19 checks passed
@rynfar
rynfar deleted the feat/pylon-abort-and-send-queued branch September 25, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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