Skip to content

Route mid-run Enter through the live reactor - #744

Merged
TheGreatAxios merged 5 commits into
mainfrom
cl-7268-route-tui-boundary-steers-through-the-active-reactor
Sep 1, 2026
Merged

Route mid-run Enter through the live reactor#744
TheGreatAxios merged 5 commits into
mainfrom
cl-7268-route-tui-boundary-steers-through-the-active-reactor

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Mid-run Enter delivers through Agent.deliver into the live reactor instead of starting a second send.
  • Idle follow-up stays a normal send. /clear and /new drop queued input so it cannot enter the next session.

Verification

  • bun run typecheck, bun run build, and bun run test pass
  • Busy Enter at a parent tool.boundary uses deliver, not sendImmediate; session rotation leaves the queue empty and idle

Fixes CL-7268

@linear-code

linear-code Bot commented Aug 31, 2026

Copy link
Copy Markdown

CL-7268

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review · Comment

Mid-run Enter delivers through Agent.deliver into the live reactor; idle follow-up still sends; session rotation drops queued input.

GitHub rejects self-approve on this PR. No blocking findings.

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critic · Comment

Required deliver has no send fallback (src/tui/live-session-port.ts:52). Steers go through Agent.deliver (src/tui/runner.ts:2280). /clear drops instead of draining (src/tui/runtime-bridge.ts:1233).

No blocking findings.

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greybeard · Comment

deliver is required on the port and hosts. Kind routing lives in routeQueuedDelivery. Generation bumps only on session rotation, not interrupt.

Boundary delivery used to fall back to ordinary send when production
omitted the transport, so a queued mid-run Enter started a second
turn. Require the transport, steer via Agent.deliver, and drop queued
input on session rotation.
Live parent tool.boundary still injects via Agent.deliver. Steers
left at idle, idle-with-fleet, or after interrupt must send so they
share sendQueue, inFlight, and token refresh with follow-ups.
Ingest used to start before enqueue, so two steers at one boundary could reverse if the second mention resolved first.
Leftover hops went through sendUserPrompt with no deliveryGeneration
check, so a /clear mid-ingest still landed in the new session.
Capture generation at leftover hop time and skip send and recall
after ingest when the generation has bumped. Operator Enter stays
ungated.
@TheGreatAxios
TheGreatAxios force-pushed the cl-7268-route-tui-boundary-steers-through-the-active-reactor branch from 517d6ad to 9d9dacc Compare September 1, 2026 04:14
The required deliver hop was already on older fixtures. Two Codex hide tests
from main did not have it after rebase, so typecheck failed.
@TheGreatAxios
TheGreatAxios merged commit baeb100 into main Sep 1, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant