diff --git a/packages/tui/src/routes/session/index.tsx b/packages/tui/src/routes/session/index.tsx index d9db6d26a4..e2ece2fbd5 100644 --- a/packages/tui/src/routes/session/index.tsx +++ b/packages/tui/src/routes/session/index.tsx @@ -2262,7 +2262,7 @@ export function formatSubagentToolcalls(count: number) { } export function formatSubagentTitle(agent: string, description: string, background: boolean) { - return `${agent} Subagent${background ? " (background)" : ""} — ${description}` + return `${agent} Subagent — ${description}${background ? " [background]" : ""}` } export function formatSubagentRetry(attempt: number, message: string) { diff --git a/packages/tui/test/cli/tui/inline-tool-wrap-snapshot.test.tsx b/packages/tui/test/cli/tui/inline-tool-wrap-snapshot.test.tsx index 31b05ebcf1..f9a657ecc4 100644 --- a/packages/tui/test/cli/tui/inline-tool-wrap-snapshot.test.tsx +++ b/packages/tui/test/cli/tui/inline-tool-wrap-snapshot.test.tsx @@ -175,7 +175,7 @@ describe("TUI inline tool wrapping", () => { test("keeps background state attached to the subagent identity", () => { expect(formatSubagentTitle("Explore", "Inspect renderer", false)).toBe("Explore Subagent — Inspect renderer") expect(formatSubagentTitle("Explore", "Inspect renderer", true)).toBe( - "Explore Subagent (background) — Inspect renderer", + "Explore Subagent — Inspect renderer [background]", ) })