Agent SteeringPro
Guide a running agent without stopping it: notes queue for its next step and show when picked up, or interrupt the current step.
oxyn add agent-steering- Skip the docs folderApplied
- Use a 30 s leeway, not 60Read by agent
The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- The agent is working and the user has the next thought.
- They want to line it up without interrupting, nudge the current run, change their mind, or put a draft aside.
- The queue stack is the visible list of everything waiting to reach the agent, docked above the composer.
When not to use
- Send, stop, queue and steer in one control, in twelve styles: use Send control instead.
- Prompt composer with model picker, voice input, app connections and approval request: use Chat Composer instead.
- The model menu of an AI chat: use Model Picker instead.
Installation
Agent Steering is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add agent-steeringUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Steer
Notes the agent picks up at its next step.
- Skip the docs folderApplied
- Use a 30 s leeway, not 60Read by agent
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Empty
No notes yet.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Interrupt
Notes stop the current step.
- Skip the docs folderApplied
- Use a 30 s leeway, not 60Read by agent
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
AgentSteering
| Prop | Type | Default | Description |
|---|---|---|---|
now_msrequired | u64 | — | Host clock (ms). |
step_ms | u64 | 3000 | Step length (ms). |
steps | Vec<String> | vec!["Reading auth/token.rs".to_string(), "Running the test suite".to_string(), "Tracing the clock skew".to_string(), "Drafting the fix".to_string()] | Steps the agent works through (loops). |
notes | Vec<(String, u64)> | Default::default() | Pre-filled steering notes (text, sent `ms` ago), for demos. |
interrupt | bool | Default::default() | Interrupt by default. |
on_steer | EventHandler<(String, bool)> | — | A note was sent: (text, interrupt). |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Enter | Send a note at the next step |
| Ctrlor⌘Enter | Send and interrupt now |
Accessibility
- The current step is a status region; picked-up notes are announced.
- Interrupt is a toggle (aria-pressed).
From the spec
- The stack is a
listlabelled "Queued messages, 3"; each chip is alistitemwith its position: "Message 1 of 3, up next: <first 80 chars>". - Labels per action: "Edit queued message", "Send now — stops the current run", "Steer the current run with this message", "Move up", "Move down", "Stash", "Remove queued message", "Undo remove".
- Live region (polite): "Message queued, 3 in queue", "Sending next message", "Queue paused because you stopped the run", "Steer note delivered", "Message removed. Undo available". Delivered items are announced once, not their full text.
- Keyboard reorder announces "Moved to position 2 of 3". Drag has a full keyboard path (Space to lift, arrows, Space to drop, Esc to cancel).
- Focus order: composer → (Shift+Tab) stack header → chips top-to-bottom in delivery order → each chip's actions. After remove, focus goes to the next chip (or the composer). After edit/save, focus returns to the chip.
- Contrast: paused chips at 70 % opacity must still meet 4.5:1 text contrast (adjust the token, not the rule); Up next badge uses text, not colour alone.
- Reduced motion: see timing table.
Motion & interaction
- Queue exit (chip arrives). On Enter-to-queue, the draft text lifts off the input baseline and the chip unfolds upward from the composer's top edge: height 0 → auto with the text landing on its baseline [R079]. Existing chips shift up together. The input clears in the same commit.
- Header count. "Queued 2 → 3" rolls the digit (odometer, OpenCode-style AnimatedNumber, note 08).
- Up next badge. When chip 1 changes, the badge slides from the old chip to the new one (shared element), it does not blink off/on.
- Hover/focus actions. Actions fade + slide in 4 px from the trailing edge; they are always visible on touch and in
queue-stack/minimal. - Edit. Text flies back down into the composer (reverse of the queue exit); the chip leaves a dashed ghost so its slot is kept [R083]; saving flies it back up into the ghost.
- Drag reorder. Lift: scale 1.02, shadow elevation +1, 1° tilt only in
expressive; others shift with a spring to open the gap; drop settles with no overshoot. Auto-scroll when within 24 px of the stack edge (in overflow scroll mode). - Steer. The chip turns into a ⤷ note; when the agent reaches the next tool boundary the note glides into the plan step or transcript row that consumed it [R080] and leaves an inline "↳ Steered" marker. If the plan component isn't mounted, it glides into the transcript.
- Send now. Header flashes "Stopping current run…"; the status strip drops "Interrupted" into the transcript (see composer-status-strip.md); then the chip delivers.
- Delivery. Up next chip slides down-and-into the transcript as the user bubble; the remaining chips settle down one slot. Read-receipt fade on the bubble until the agent's first event (note 08).
- Stash. Text shrinks into a tab at the composer's top-left with a count badge [R079] ("Stash 2"); the tab is not part of the delivery order. Clicking the tab unfolds the stashed list.
- Remove. Chip collapses to a 28 px "Removed · Undo" row, which collapses fully after 5 s.
- Overflow collapse. When n >
max_expanded(default 3), chips 2..n fold behind chip 1 as a stacked-card edge (2 px offsets, max 2 visible edges) plus "+k more". Expanding fans them up. - Two lanes. Left/top lane "You" (user messages and steer notes), right/bottom lane "Agent" (agent's own queued work items, read-only text, can be skipped or moved up if the adapter allows) [R084]. Lane headers carry their own counts.
Timing
| Transition | Duration | Easing / spring | Notes |
|---|---|---|---|
| Chip unfold upward (enter) | 200 ms + 40 ms stagger (cap 4) | ease.out | same numbers as send-control timing table |
| Other chips shift up | 200 ms | spring.snap | |
| Header count roll | 300 ms | ease.out (cubic-bezier(0.22,1,0.36,1)) | OpenCode's AnimatedNumber uses 560 ms; we use 300 ms for a 1-digit change (proposed) |
| Up next badge slide | 180 ms | spring.snap | shared element |
| Hover actions in | 120 ms, x +4 → 0 | ease.out | out 80 ms |
| Edit fly-down / fly-up | 200 ms | ease.in-out | ghost fades in 120 ms |
| Drag lift | 120 ms | ease.out | scale 1.02 |
| Gap open while dragging | 160 ms | spring.soft | |
| Drop settle | 140 ms | spring.snap (no overshoot) | |
| Steer glide to plan step | 320 ms | ease.in-out | path-arc, opacity 1 → 0 at the end |
| Delivery into transcript | ≤ 260 ms | ease.in | matches send-control's draft → bubble |
| Read-receipt fade 0.6 → 1 | 160 ms | ease.out | on agent's first event |
| Draining grace | 600 ms | linear ring | Esc holds |
| Stash shrink to tab | 220 ms | ease.in | tab count pops 1.0 → 1.15 → 1.0, 180 ms |
| Remove collapse / undo window | 160 ms / 5 s | ease.in | |
| Overflow fold / fan | 200 ms + 30 ms stagger | spring.soft | |
| Paused dim | 160 ms | ease.out | opacity 1 → 0.7 |
| Reduced motion | all moves become 0–80 ms opacity crossfades; no lift/tilt (drag shows an outline at the target index); steer and delivery simply fade out of the stack and in at their destination; counts change without rolling | — | — |
Responsive behaviour
- The step line truncates; the note field keeps its width.
Edge cases (spec)
- Long text. Chips clamp to 2 lines (1 line in
compact) with an end fade; full text on hover tooltip after 500 ms and in edit. Attachments show as a count chip ("📎 3"), never thumbnails. - Overflow.
max_expandeddefault 3; stack height capped at min(40 % of viewport, 240 px); beyond the cap the list scrolls inside with a top fade mask. Header always pinned. - Many items. Above 50 items the list virtualises; drag reorder still works with keyboard moves.
- Very fast agent. If the run ends < 600 ms after queueing, the chip may deliver before its enter animation ends: interrupt the enter and go straight to delivery (never queue the animations).
- Very slow agent / long runs. Queue may sit for hours: show "queued 2h ago" relative time on hover; steer notes older than the current step's start are flagged "may be stale".
- Steer with no tool boundary. Pure-streaming runs have no boundary; steer note waits until the turn ends, then becomes a message (label changes to "Will send next"). Apps whose adapter can't steer hide the Steer action (
can_steer = false). - Edit while it becomes Up next and the run ends. Editing locks that chip: draining skips to the next item or waits, never sends a half-edited message.
- Send now on an item with an open approval. Ask: "Stop and discard the pending approval?" — consequential, so a confirm (proposed).
- Error mid-queue. Failed chip stays in place with retry; later chips wait (order is preserved).
- Persistence. Stored per thread via the app's
QueueStore(drafts + order + kind + attachments refs). On restore the stack isPaused("Restored"); nothing is auto-sent after a reload or crash. Attachments whose upload expired show "Re-attach file". - Multiple windows / devices. Last writer wins per item id; a chip edited elsewhere shows "Changed on another device" and reloads its text.
- RTL. Actions mirror to the leading edge; drag handle moves to the trailing edge; lanes swap sides.
- Tiny sizes / dense IDE. At 28 px rows the header merges into one line "Queued 3 ▾"; drag handle hidden, reorder via
Alt+Shift+↑/↓only. - Touch. Actions always visible (no hover); long-press 350 ms starts drag; 44 px hit areas.
- Slow networks. Queue writes are local first; "Saving…" never blocks typing.
Notes for AI
- Import
AgentSteeringfromoxyn_dioxusand includeCOMPOSER_CSSplus the token stylesheet once. - A GPUI version exists:
SteeringElinoxyn_gpui. - Props to set first:
now_ms. - 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.