Skip to content

feat(ui): Stop button + queue-at-boundary for task interrupt (AGX1-391)#366

Closed
declan-scale wants to merge 1 commit into
mainfrom
declan-scale/agx1-391-agentex-ui-stop
Closed

feat(ui): Stop button + queue-at-boundary for task interrupt (AGX1-391)#366
declan-scale wants to merge 1 commit into
mainfrom
declan-scale/agx1-391-agentex-ui-stop

Conversation

@declan-scale

Copy link
Copy Markdown
Collaborator

Draft. Frontend half of AGX1-391 for the native agentex chat. Split out of the backend PR #365.

Included

  • Dual-mode composer button: Stop when a turn is streaming and the input is empty; Send (which enqueues) when there is text; normal Send when idle.
  • Esc-to-interrupt while streaming.
  • Queued-message chip, flushed on the streaming->idle edge (queue-at-boundary).
  • INTERRUPTED treated as non-terminal (composer stays enabled; running is judged from rpcStatus).
  • Sync message/send AbortController exposed so Stop tears the stream down; meta cache settled to idle so no hung 'thinking' indicator.

Depends on

  • scale-agentex#365 (the POST /tasks/{id}/interrupt route + INTERRUPTED status). The interrupt call uses a thin REST adapter with a TODO(AGX1-391) to swap to the typed SDK method after regeneration.

Note

  • A couple of explanatory comments were added in the .ts hooks; will strip to match the no-inline-comment convention before marking ready.

🤖 Generated with Claude Code

Dual-mode composer button (Stop when a turn is streaming and the input is empty; Send that enqueues when there is text), Esc-to-interrupt, a queued-message chip flushed on the running->idle edge, and INTERRUPTED treated as a non-terminal status (composer stays enabled). Exposes the sync message/send AbortController so Stop tears down the stream, and settles the rpcStatus meta cache to idle so no thinking indicator hangs. The interrupt call goes through a thin adapter (POST /tasks/{id}/interrupt) with a TODO to swap to the typed SDK method once regenerated. Part of AGX1-391; depends on the backend PR scale-agentex#365.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@declan-scale

Copy link
Copy Markdown
Collaborator Author

Closing per design discussion on AGX1-391: interruption must be implemented by the agent itself (the agent stops its own turn and sets its state to INTERRUPTED; the control plane just forwards task/interrupt like event/send). A generic Stop button in the native agentex-ui would be misleading for any agent that does not implement self-interruption. The golden-agent-specific Stop + queue-at-boundary UI stays in scaleapi#151564 since the golden agent implements the interrupt handler.

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