Skip to content

fix(server): dismiss native questions after their turn ends - #297

Merged
rynfar merged 1 commit into
pylonfrom
upstream/2026-09-06-terminal-question-cleanup
Sep 6, 2026
Merged

fix(server): dismiss native questions after their turn ends#297
rynfar merged 1 commit into
pylonfrom
upstream/2026-09-06-terminal-question-cleanup

Conversation

@rynfar

@rynfar rynfar commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

When a native provider turn ended with an unanswered question, the thread could retain a pending-input form that could no longer receive an answer. Resolve unanswered native questions for the exact terminal turn, including completed, failed, interrupted and aborted outcomes.

Adopts approved B5, upstream #9851, d7fe47fd0957a34fc2e8bb05f12db19bac3403b6. Uses Pylon’s existing guarded dispatch, session-incarnation checks and drainable worker. Prime interaction records, answered questions, other turns and explicitly stored message-mode activities are preserved. Does not import upstream’s separate async-question API. Applies to all native providers and every client/connection mode.

Validation: 91 focused ingestion tests pass, including duplicate terminal events, all terminal outcomes, answered/newer/child requests and a retired session attempting to clear a current session’s question. Server typecheck, targeted lint and diff checks pass. Tests use isolated in-memory persistence and worker drains.

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.

(cherry picked from commit d7fe47fd0957a34fc2e8bb05f12db19bac3403b6)
@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 −4 B (−0.0%) 15.1 KiB
Codex Thread snapshot wire 7.1 KiB 7.1 KiB −3 B (−0.0%) 7.3 KiB
Codex Live turn WebSocket wire 6.5 KiB 6.5 KiB −1 B (−0.0%) 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 −17 B (−0.1%) 15.1 KiB
Claude Thread snapshot wire 7.1 KiB 7.1 KiB −5 B (−0.1%) 7.3 KiB
Claude Live turn WebSocket wire 6.6 KiB 6.5 KiB −12 B (−0.2%) 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: e58f82c · PR result: cae470f · 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 b787b72 into pylon Sep 6, 2026
17 checks passed
@rynfar
rynfar deleted the upstream/2026-09-06-terminal-question-cleanup branch September 6, 2026 13:27
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.

2 participants