A piece of work your agent handed to a helper agent, as a row in the conversation: who, what for, and where it stands, with what they are doing now while they run and what came of it once they finish, how many steps they took and for how long. Open thread opens everything they did in your ThreadRail, inside ThreadLayout, which gives focus back to the button when the thread closes. A helper waiting for the person says "Waiting for you"; put the PermissionPrompt or PlanApproval they wait on in their thread. Status is said in words, not only by colour, and a screen reader hears it with the row's name.
Install
Add SubagentThread from Ouro UI to this app. Read https:// ui.ouroboros.bot/ docs/ subagent-thread.md first and follow it.Or by hand. Once per app, with Tailwind CSS v4 and an @/* path alias (Ouro HX is built on Base UI, so --base base; skip -t in an existing app):
npx shadcn@latest init --base base --preset nova --yes --no-monoreponpx shadcn@latest add ourostack/ouro-ui/ouro-base#v1.3.823Then the component (Installing):
npx shadcn@latest add ourostack/ouro-ui/subagent-thread#v1.3.823Or, with the @ouro namespace set up:
npx shadcn@latest add @ouro/ouro-base @ouro/subagent-threadIts tests, stories and Playwright spec are optional. They need Vitest 4.1.11 or later, and from v0.8.0 never change a version your app has (Testing):
npx shadcn@latest add ourostack/ouro-ui/subagent-thread#v1.3.823 ourostack/ouro-ui/subagent-thread-tests#v1.3.823import { SubagentThread } from "@/components/ouro/subagent-thread/subagent-thread";Paths use shadcn's default @/ alias; the CLI rewrites them to yours.
Example
<ThreadLayout
conversation={<SubagentThread name="Research helper" task="Find three weeknight dinners" status="running" latest="Reading recipes/roast.md" steps={4} duration={38} onOpen={() => setOpen(true)} open={open} />}
thread={open ? <ThreadRail label="Research helper's thread" title="Research helper" onClose={() => setOpen(false)}>{calls}</ThreadRail> : null}
/>Use instead when
- Use
ToolCallinstead for one call to a tool, andToolCallGroupfor several in a row. - Use
AgentPresenceinstead for agents listening on the person's behalf outside a conversation.
Props
Type: SubagentThreadProps.
className- Type:
string - Layout only: margins, width (
mt-1). Appearance classes warn in development. duration- Type:
number - How long they have worked, in seconds, shown short: "1m 4s".
latest- Type:
ReactNode - What they are doing right now, shown while they run or wait: "Reading recipes/roast.md".
name(required)- Type:
ReactNode - Who the agent handed the work to, as the person knows them: "Research helper".
onOpen- Type:
(() => void) - Called when the person presses Open thread: open the helper's thread in your
ThreadRailbeside the conversation. The button shows only when you pass it. open- Type:
boolean - Whether their thread is open now: the button is filled, and says so to a screen reader (
aria-expanded). openLabel- Type:
string - Default:
"Open thread" - The button's label. A screen reader hears it with the helper's name: "Open thread for Research helper".
ref- Type:
Ref<HTMLElement> - Reaches the rendered element.
status(required)- Type:
"failed" | "running" | "done" | "waiting" - Where their work stands, as a ToolCall's does.
runningshows a spinner;donea tick;faileda cross and "Failed";waiting(for the person, such as for their permission) a clock and "Waiting for you". steps- Type:
number - How many steps they have taken so far, such as tool calls: "12 steps".
summary- Type:
ReactNode - What came of it, shown once they are done or have failed: "Found three weeknight dinners."
task(required)- Type:
ReactNode - What they were asked to do, in a few words: "Find three weeknight dinners".
Don't use
These are not props. Passing one fails the type check with the fix in the error, and in development a console message names the fix.
agent: Not a prop. Who did the work isname:<SubagentThread name="Research helper">.description: Not a prop. What they were asked istask:<SubagentThread task="Find three dinners">.onClick: Not a prop. The button callsonOpen:<SubagentThread onOpen={openThread}>.result: Not a prop. What came of it issummary:<SubagentThread summary="Found three">.state: Not a prop. Where the work stands isstatus:<SubagentThread status="running">.title: Not a prop. What they were asked istask:<SubagentThread task="Find three dinners">.
className is for layout only
Pass margins, width and grid placement (mt-4, w-full, col-span-2).
Appearance comes from props, not classes. In development, a class that sets appearance logs one warning per component instance, naming the prop to use instead. A class sets appearance when, after its variants (hover:, sm:) and any ! are removed, it starts with bg-, text-, border-, rounded-, shadow-, font-, ring-, from-, via-, to-, fill- or stroke-, or is border, rounded, shadow or ring, or has a dark: variant. Text wrapping, overflow and table layout classes (text-wrap, text-ellipsis, border-collapse) are layout and do not warn.
Alignment classes (text-center) warn too: set alignment on a parent element.

