Skip to content
Back

Run Controls

Stop, steer and queue a running agent – the answer streams with a caret, a steer lands mid-sentence as a pill, a queued message runs next, and a stopped run resumes from its word.

oxyn add run-controls
MCP
Draft the release notes for 2.4
Release writerThinking…

Escto stop
  • Add an upgrade note for self-hosted teamsNext
38%
Release writer: Thinking…, 1 queued
Dioxus
rsx! {
    AgentRunPanel {
        agent: "Release writer".into(),
        turns: run.turns(),
        queue: run.queue(),
        now: clock.now(),
        on_action: move |(what, text)| dispatch(what, text),
    }
}

Rendered from Rust at build time · goes live when visible

When to use

  • Stop, steer and queue a running agent from one card: the run above, the queue band, the composer Below.

When not to use

  • An agent asks before it acts: use Approval Card instead.
  • Several open requests in one card: use Approval pager instead.
  • An agent's question in its own card above the composer: use Decision Card instead.

Installation

Run Controls is free and MIT. The oxyn CLI copies its code, and the components it needs, into src/oxyn/ of your Dioxus or GPUI project, so it is yours to change.

Terminal
cargo install --git https://github.com/ismailqureshi72/Oxyn oxyn-cli
oxyn init
oxyn add run-controls
Rust
use crate::oxyn::{AgentRunPanel, STATUS_INDICATOR_CSS};

Rather depend on the crate? cargo add oxyn-dioxus oxyn-core --git https://github.com/ismailqureshi72/Oxyn, then use oxyn_dioxus::{AgentRunPanel, STATUS_INDICATOR_CSS};

Usage

Dioxus · rust
rsx! {
    AgentRunPanel {
        agent: "Release writer".into(),
        turns: run.turns(),
        queue: run.queue(),
        now: clock.now(),
        on_action: move |(what, text)| dispatch(what, text),
    }
}

Examples

Running

Streaming: a steer lands mid-sentence as a blue pill, the queued message waits as Next and runs when the turn is done.

Draft the release notes for 2.4
Release writerThinking…

Escto stop
  • Add an upgrade note for self-hosted teamsNext
38%
Release writer: Thinking…, 1 queued
Code
rsx! {
    AgentRunPanel {
        agent: "Release writer".into(),
        turns: run.turns(),
        queue: run.queue(),
        now: clock.now(),
        on_action: move |(what, text)| dispatch(what, text),
    }
}

Stopped

Stopped at a word: Resume, Retry, Dismiss.

Draft the release notes for 2.4
Release writerStopped

Release 2.4 – faster syncs and a calmer inbox.

Sync – large workspaces now load about twice as fast, and the first sync after an update no longer blocks

Stopped at 29 words
41%
Release writer: Stopped
Code
rsx! {
    AgentRunPanel {
        agent: "Release writer".into(),
        turns: run.turns(),
        queue: run.queue(),
        now: clock.now(),
        on_action: move |(what, text)| dispatch(what, text),
    }
}

Done

Done: the time it took and Retry.

Draft the release notes for 2.4
Release writerDone

Release 2.4 – faster syncs and a calmer inbox.

Sync – large workspaces now load about twice as fast, and the first sync after an update no longer blocks the editor.
Keep it to three sections
Three sections it is – the small fixes fold into one line.

Inbox – mentions and replies are grouped by thread, and muted threads stay muted on every device.

Fixes – exports keep image captions, the date picker respects the week start, and shortcuts work again on non-US keyboards.

Done in 0:06
48%
Release writer: Done
Code
rsx! {
    AgentRunPanel {
        agent: "Release writer".into(),
        turns: run.turns(),
        queue: run.queue(),
        now: clock.now(),
        on_action: move |(what, text)| dispatch(what, text),
    }
}

Permissions

What the agent may do: Ask first, Auto-edit, Full access in red.

Ask Release writer anything – steer it or stop it while it works.

38%
Release writer:
Code
rsx! {
    AgentRunPanel {
        agent: "Release writer".into(),
        turns: run.turns(),
        queue: run.queue(),
        now: clock.now(),
        on_action: move |(what, text)| dispatch(what, text),
    }
}

Chat mode

Chat mode: the permissions are disabled – chat only answers.

Ask Release writer anything – steer it or stop it while it works.

38%
Release writer:
Code
rsx! {
    AgentRunPanel {
        agent: "Release writer".into(),
        turns: run.turns(),
        queue: run.queue(),
        mode: "chat".into(),
        now: clock.now(),
        on_action: move |(what, text)| dispatch(what, text),
    }
}

Classic

Classic style: the run as a white panel on a grey tray, the queue on the tray.

Draft the release notes for 2.4
Release writerThinking…

Escto stop
  • Add an upgrade note for self-hosted teamsNext
38%
Release writer: Thinking…, 1 queued
Code
rsx! {
    AgentRunPanel {
        agent: "Release writer".into(),
        turns: run.turns(),
        queue: run.queue(),
        now: clock.now(),
        on_action: move |(what, text)| dispatch(what, text),
    }
}

Oxyn run controls

Extended: the run composer with a send menu (Send now, Steer, Queue) and an error state.

BuilderWorking
Add rate limiting to the public API

Then update the changelog
42%
Code
rsx! {
    RunControls {
        agent: "Builder",
        prompt: run.prompt.clone(),
        answer: run.answer.clone(),
        status: "running",
        now: clock.now(),
        on_action: move |(what, text)| dispatch(what, text),
    }
}

API reference

AgentRunPanel

PropTypeDefaultDescription
agentString"Release writer"Agent name in the header.
turnsrequiredVec<RunTurn>—Turns: the first runs on its own; the rest are the replies to queued or sent messages, in order. Text: blank lines are paragraphs, `[[steer:…]]` a steer pill.
queueVec<String>Default::default()Messages waiting in the queue at the start.
autoplaybooltrueStart running (`false`: idle with the empty state).
stopped_atOption<usize>Default::default()Stop the first turn at this word at the start.
elapsedu64Default::default()How far into the first turn it starts, ms (a large value starts it done).
modeString"act"`act` or `chat`.
permissionString"ask"`ask`, `auto` or `full`.
menu_openboolDefault::default()Open the permissions menu at the start.
contextf3238.0Context in use before the run, percent.
styleStringDefault::default()`clean`, `classic`, or empty to follow `data-cstyle`.
nowrequiredClockMs—Shared clock.
on_actionEventHandler<(String, String)>—Actions: (`send` | `steer` | `queue` | `stop` | `resume` | `retry` | `dismiss` | `remove`, text).

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
EnterSend when idle; steer while running
⌥ EnterQueue
ShiftEnterNew line
EscStop a running stream (or close the menu)

Accessibility

  • The run is a polite log, busy while streaming; a status region reads "Release writer: Writing · steered, 1 queued".
  • Mode is a radiogroup; the permissions button is aria-disabled in Chat mode with the reason in its title; the menu is a listbox.
  • Reduced motion stops the caret blink and the pill and roll animations.

Motion & interaction

Timing
  • Thinking 900 ms; one word per 55 ms; context grows 0.12 % per word.
  • Turns and queue rows fade up 3 px over 240 ms; the steer pill pops (scale .8 → 1, 260 ms); status words blur in.
  • Caret blinks 1 s steps. Reduced motion: no blink, no pops.

Responsive behaviour

  • Fills its container up to 520 px; under 440 px the composer's controls wrap and the answer drops its indent.
Edge cases (spec)

Up to 520 px; under 440 px the composer's controls wrap and the answer drops its indent.

Notes for AI

  • Import AgentRunPanel from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: AgentRunPanelEl in oxyn_gpui.
  • Props to set first: turns, now.
  • It reads a clock (now) for live timers; pass one clock for the whole page rather than one per component.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI