Skip to content

feat(chat): bring back Crew Mode as one switch - #22842

Closed
bolichen97 wants to merge 3 commits into
mainfrom
feat/crew-mode-v2
Closed

bolichen97 wants to merge 3 commits into
mainfrom
feat/crew-mode-v2

Conversation

@bolichen97

@bolichen97 bolichen97 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A person finds and runs the conductor through one Crew Mode switch, and the sessions it dispatches stay out of their session lists and folders while they can still watch and steer each one.

The conductor is one entry in a long agent list, so most people never find it, and when they do its workers flood the session list and create folders the person did not ask for. There is no place that shows what each worker is doing, and no way to type into a worker without opening it as an unrelated chat.

Why it matters

Crew Mode is the way a person gets a goal split into parallel chats. Without a single, recognisable entry point it goes unused, and with workers mixed into the person's own list the list stops being theirs.

Not a goal

  • A Projects tab. The panel footer says it is coming; it needs its own design.
  • Narrowing the tools a worker runs with. Workers keep the default agent's tools.
  • Migrating folders or workers that older conductors already created.
  • A timeline on phones. Phones show the worker list only.
  • A screen reader pass over the new surfaces (not done yet).

What changed (motivation → approach → change)

Goal: one switch, one conductor, a person's list that stays the person's, and the workers visible where the conductor is.

Approach: Crew Mode is an ordinary agent switch onto one configured conductor, so nothing new runs and memory and history stay. The rule for "which sessions are a Crew Mode root, and which are its workers" lives in one server module and is stamped on every slot row; every list, picker, folder tool and route reads that stamp instead of carrying its own copy. The board-in-chat rule follows the existing in-progress RFC docs/request-for-change/rfc-conductor-chat-board-on-tab.md (a conductor whose tab shows the board writes no board in the chat). Crew Mode itself, as a product shape, has no RFC on main yet; a maintainer decision is needed for the First Principles lane.

What was built:

  • One conductor. New config key agent.crew_mode_agent (default kirocrew-conductor). The Crew Mode chip on a new chat switches to it. A normal chat's agent picker and the keyboard agent cycle list no conductor; a conductor chat has no agent picker. The name is read from the live config at the point of use, so a custom conductor applies from gateway start.
  • Workers out of the person's lists. crew_mode.py stamps crew_mode_root / crew_root on slot rows. The sidebar, the Sessions page, command palette Recents and an artifact's Send to session all read one selector (selectPersonSlots). A Crew Mode root and its workers are never filed into the person's folders: session-control create drops folder_id and the MCP folder tools say why.
  • Workers panel. A Workers tab in the side panel, offered on every Crew Mode root and worker, and in the + menu. Cards are grouped Needs you / Working / Waiting / Done from real signals only (an open approval or question, a running turn, a closed tab or ledger item, a ledger report). A worker that has merely replied is not counted done. Each card has a one-line task. GET /api/chat/slots/{slot}/crew-workers, owner only.
  • Worker view. A card opens the worker in the main pane like any session, with a breadcrumb (root > worker), Back to conductor, and a steer box ringed in the crew purple that types into the worker as the person (POST .../crew-workers/{worker}/steer). It cuts into a running turn or queues for the next one, through the composer's own delivery helpers. The first delivered message reads "From conductor" instead of the raw envelope line. On desktop the panel stays beside the worker; on a phone the sheet closes so the chat shows.
  • Timeline. A List | Timeline switch in the Workers tab: one lane per session (conductor first), with turns, tool calls, waits on the person and hand-off arrows, all drawn from recorded transcript rows (GET .../crew-timeline). What is not recorded (for example a tool's end time, tokens) is listed behind an (i) and never drawn. Long stretches are drawn shorter so short bars stay readable; the header keeps the true elapsed time and credits. No playhead under reduced motion, and the view holds still while the person types.
  • Design B visuals. The root row is a gradient crew card with its workers' ghosts and "Needs you · N" / "Done x/y"; the sidebar filter has a Crew Mode chip. All colours come from theme tokens; status text reaches at least 4.5:1 in both themes on every row state.

Backwards compatibility

Compatible: the new config key defaults to the conductor the chip already used, the new routes are additive, and GET /api/chat/slots keeps every row for agents and for ?crew=all.

The diff takes rows away from some readers. Each one:

Reader: src/kiro_crew/dashboard/chat_api/slot_detail.py:api_chat_slots -- chat -- a person's read without ?crew=all leaves out Crew Mode workers; an agent's read (internal_auth) keeps every row, pinned by test_an_agents_read_keeps_the_workers_its_tools_resolve.
Reader: website/src/pages/ChatSidebar.tsx, pages/SessionsPage.tsx, components/commandPalette/providers/recentsProvider.ts, components/ArtifactSendToSession.tsx -- crew page -- workers are left out by selectPersonSlots; the Recents Older rows still dedupe against every live row, pinned by personSlots.crewWorkers.test.tsx.
Reader: the agent picker and the keyboard agent cycle -- chat -- conductors are left out of a normal chat's list (withoutConductors, agentCycleTarget); crewmates whatever their name stay, pinned by the crewMode tests.
Reader: src/kiro_crew/dashboard/session_control_parts/session_create.py:create_session -- subagent -- drops folder_id only for a Crew Mode root or its workers and answers folder_ignored: "crew_mode", pinned by test_session_control_create_filing.py.

Tests

  • test/test_crew_mode_workers.py: the stamp rule, list views, the worker list (groups from real signals, the one-line summary through the board's redactor, closed workers' saved titles), the steer route (owner-only, app tokens denied, scoped to the root's tree, steers or queues as the person, a held steer is persisted and shown), the live-config conductor name, and route registration.
  • test/test_crew_timeline.py: bars from recorded rows only, approval waits, hand-offs paired by target, only the genuine envelope on a row no person typed counts as a hand-off, labels redacted, and a 10,000-row window that is one pass (row reads counted).
  • test/test_session_control_create_filing.py, test/test_crew_mode_board.py, test/test_agent_execution_catalog.py: folder drop, the board line in the dashboard block, the catalog fields.
  • Frontend: CrewWorkerList, CrewTimeline (including the ticking and reduced-motion cases), crewTimeline scale, crewWorkers, crewSeed/UserMessage, CrewWorkerBreadcrumb (phone), the sidebar crew card, the Sessions page and Recents rule, the panel's Workers offer and + menu, and the phone sheet closing on a worker open.

Local gate: check_black_formatting.py, check_subprocess_encoding.py, isort, flake8, mypy src/kiro_crew, comment-history, brand, line cap, harness parity, i18n check, docs-lint, npm run build, and scripts/local-gate.py related tests on both surfaces.

Manual verification

On a local preview gateway with real data: a real conductor split a real goal into three workers. Checked the crew card and filter, no agent picker in the conductor chat, the Workers list and timeline, a worker in the main pane, a real steer landing, the breadcrumb back, the phone layout at 390 px (breadcrumb, 44 px Back target, 16 px steer input, sheet closes on open), light and dark themes, and status-text contrast measured on the rendered pixels (every label at or above 5.9:1). Two independent code-review rounds and two UI-review rounds were run before opening; every finding is fixed except the phone timeline, which is out of scope above.

Screenshots / video

Session list with the Crew Mode card

Worker in the main pane with the Workers list beside it

Timeline

crew-mode-v2-demo.webm
More screens

Light theme list

Crew Mode filter

Conductor composer without an agent picker

Workers panel

Worker before the steer

Related Issues

Restarts the closed #21889.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

…de panel

Crew Mode hands a chat to one conductor agent, set by the new config key
agent.crew_mode_agent (default kirocrew-conductor). The Crew Mode chip on a
new chat is the only way in: a normal chat's agent picker and the keyboard
cycle list no conductor, and a conductor chat has no agent picker.

The sessions a Crew Mode chat dispatches stay out of the person's session
lists (sidebar, Sessions page, command palette Recents, Send to session) and
out of their folders, on the server and in the MCP folder tools. They are
listed in the side panel's Workers tab, grouped Needs you / Working /
Waiting / Done from real signals only, and open in the main pane like any
session, with a breadcrumb, Back to conductor and a steer box that types into
the worker as the person.

The root row is a gradient crew card with its workers' ghosts and a summary;
the sidebar filter has a Crew Mode chip. The Workers tab has a List |
Timeline switch: one lane per session drawn from recorded transcript rows
only, with turns, tool calls, waits and hand-off arrows, and what is not
recorded listed instead of drawn. Phones show the list.

New routes: GET /api/chat/slots?crew=roots|all,
GET /api/chat/slots/{slot}/crew-workers,
GET /api/chat/slots/{slot}/crew-timeline and
POST /api/chat/slots/{slot}/crew-workers/{worker}/steer, owner only.
@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners October 21, 2026 17:59
@bolichen97
bolichen97 requested a review from CrysisDeu October 21, 2026 17:59
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 21, 2026
@bolichen97
bolichen97 enabled auto-merge (squash) October 21, 2026 18:05
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Sensitive Change Review

Sensitive files changed:

  • src/kiro_crew/security_posture.py

  • No reasoning template for f2f1458 yet.

How to clear this check:

  1. The PR author posts the template below as a PR comment, with
    every field filled (N/A needs a reason). Keep the
    Head commit line: it must name the current head SHA.
  2. The check turns green within a minute, with no push.
  3. A new push resets this check: post it again for the new head.

Only the author's comment counts this way. A reviewer can instead
paste the filled template into an "Approve" review on this head.
Merging still needs a reviewer's approval.

## Sensitive change review
- Head commit: f2f1458417ddc1b30c0a24449ab49b22dc775c79
- What rule changed:
- Before -> after (what was allowed/blocked, now):
- Worst case if wrong (breaks commands / leaks secret / locks user out):
- Evidence checked (which sandbox result proves it):
- No regression:
  - Tools still work (which tools/commands were run, result):
  - Backward compatible (old config / old data / old callers still work, how checked):
  - Existing tests (which suites passed on this head):
- How to undo:

@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Oct 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — 🔴 BLOCK

Premise-level review of f2f1458417ddc1b30c0a24449ab49b22dc775c79 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: BLOCK

Product-shape change without accepted RFC: Crew Mode was retired, and this PR brings it back. It also changes what every person's sidebar, Sessions page, Recents and agent picker show by default. No non-draft RFC on the base covers this.

What this change ships

Inventory (10 items, more exist) — 7 justified

Intent: a person finds and runs the conductor through one Crew Mode switch, and its workers stay out of their own lists. ADDITION.

  1. A Crew Mode chip on a new chat switches the chat onto the conductor — justified
  2. Workers no longer appear in the sidebar, Sessions page, Recents or Send to session by default — justified
  3. The normal agent picker and keyboard cycle no longer list conductors; a conductor chat has no picker — justified
  4. Crew Mode roots and workers can't be filed into folders; folder_id is dropped on create — justified
  5. New config key agent.crew_mode_agent — justified
  6. Workers tab in the side panel and + menu, with grouped cards — justified
  7. Worker view with breadcrumb and a steer box that types into the worker — justified
  8. Timeline view with lanes drawn from transcript rows — oversized: needs a Goal amendment
  9. Gradient crew card for the root row, plus a Crew Mode sidebar filter chip — oversized: a visual layer beyond the Goal
  10. The first delivered message reads "From conductor" — rides along

Notes

  • Item 8 — oversized: the Goal is "watch and steer each one", and the Workers list plus steer box already deliver that. Subtraction: defer crew_timeline.py, GET .../crew-timeline, CrewTimeline.tsx and lib/crewTimeline.ts to their own PR. Clears when: the mechanism is removed, or a human amends the Goal.

Blockers

Product-shape change without accepted RFC: Crew Mode reinstated as the default way to reach the conductor, and workers hidden from a person's lists by default — product shape
Trigger: items 1–3. The diff adds to crew-mode.md: "Crew Mode is the composer switch that runs a dashboard chat on a conductor template". That spec section, and rfc-orchestrator-chat-sessions.md (superseded), both say "Crew Mode is retired." The description admits: "Crew Mode itself, as a product shape, has no RFC on main yet". The base RFC list holds only rfc-conductor-chat-board-on-tab.md (in-progress), which covers just the in-chat board rule. Nothing covers the switch or hiding rows by default.
Outcome: a recorded retirement is reversed, and every person's default session lists and agent picker change, with no decision on record.
Clears when: an RFC covering a reinstated Crew Mode switch and default-hidden workers is merged on the base as accepted, in-progress, partial or implemented, followed by a push or rebase; or a maintainer posts /ai-review override first-principles f2f1458417ddc1b30c0a24449ab49b22dc775c79: <decision>.

[FIRST-PRINCIPLES-REVIEWED] f2f1458

Description read

[DESCRIPTION-READ] 26efda62500ef0c328117a1753d85b894da7560c28d39d1e798d38547e445605

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of f2f1458417ddc1b30c0a24449ab49b22dc775c79 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks. Evidence is attached, the rows the patch takes away are listed with tests, and the root and worker rule sits in one server module that every reader shares.

Notes

  • src/kiro_crew/docs/agents.md contradicts the description and the code. It says "The agent picker can still move the chat to another agent", but the description says "a conductor chat has no agent picker". It also says "make it the default agent instead", but the conductor is now left out of the picker that path would seem to use. Make the shipped doc match.
  • Worker status depends on the root's current agent (runs_conductor(row.get("agent"), ...)). If a root moves off a conductor, by any route, its workers go back into the person's lists and become fileable into folders again. State this in crew-mode.md, or say that a Crew Mode root cannot change its agent.

[DESIGN-REVIEWED] f2f1458

Description read

[DESCRIPTION-READ] b02385b84e93927a3ffca034d1764916c397c89f5d4270e5a64adcc01c128340

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)

UX-level review of f2f1458417ddc1b30c0a24449ab49b22dc775c79 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

cannot evaluate: missing the Crew Mode switch on a new chat and the Crew Mode welcome page. The PR exists to add that switch, and no supplied screenshot shows it, the page or the Task board button.

Evidence gaps

  • CrewModeChip, the switch itself ("Crew Mode: split into tasks", or "Crew Mode" on a phone), off and busy ("Available after the reply."). The blind read only saw conductor chats that were already running. Fix: a still of a new chat's welcome state with the chip beside the memory-mode chip.
  • CrewModeWelcome: the hero, "You set the goal. Your crew does the work.", the five-step flow and the Task board button, plus the icon-only version used where space is tight. Fix: a still of an empty chat right after the switch is pressed.

Notes

  • CrewModeComposerChip is only a label, but it looks like a filled button. The reader thought it might turn crew mode off: "no, I'm afraid it would change the whole chat." Style it as plain text, like the agent badge, and don't use the button shape.
  • steer_placeholder / steer_hint say "running chat" even on a worker marked Done, which confused the reader. Use "Steer {{name}}…" with the hint "Your message goes to this worker."
  • .crew-grad and .crew-card add new linear-gradient fills to the chips, the filter chip and the session row. That goes against the flat-fill rule in theming-contract.md. Use the solid --aim token.

[UX-REVIEWED] f2f1458

Description read

[DESCRIPTION-READ] 6cb1277ccc34871999252506a916a7f1e9a9d859869b95f9f65fb8d50fc91cda

That sha256 names everything this verdict read: the PR description, plus the 11 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — 🔴 changes requested (blocking)

Reviewed f2f1458417ddc1b30c0a24449ab49b22dc775c79 — this comment is updated in place on each push.

Blocking: when a Crew Mode root closes, its workers stay hidden from every session list. The new crew_root / crew_mode_root stamps are only computed on full slot frames, and the slot_patch frame a close sends never clears them.

BLOCKING — src/kiro_crew/dashboard/state_parts/slots_frame.py:880
crew_mode.stamp_rows(out)
Trigger: A person closes a Crew Mode root chat that has live workers (DELETE slot → slot_lifecycle → state.push_slot_removed(name)). A dashboard socket that accepts patch frames gets {"slots": [{"key", "parent"}...], "removed": [root]} with no stamp fields, and a successful close does not call fetchSlots. sseSlotPatch merges only parent with Object.assign, so each worker row still carries crew_root=<closed root>. crewModeView (ChatSidebar.tsx:136, dashboardSlice.ts:1977) then filters on !r.crew_root. push_lineage_patch has the same gap: it sends only parent / lineage_pending.
Outcome: The closed root's workers are still open, but they vanish from the sidebar, the Sessions page and Recents. Their root's side panel is gone too, so they can't be reached until some unrelated full slot frame arrives. This contradicts stamp_rows's own contract that "a worker whose root has closed is shown like any other session".
Anchor: defect
Fix: In push_slot_removed and push_lineage_patch, run crew_mode.stamp_rows over the _lineage_rows() rows and include crew_root (null when cleared) and crew_mode_root in each restated row, or fall back to push_slots_update() whenever a stamp changes.

[BLOCK-MERGE] f2f1458
[OPUS-REVIEWED] f2f1458

Verdict parsed from the review's SHA-scoped output markers for commit f2f1458417ddc1b30c0a24449ab49b22dc775c79.

False positive or not applicable? A repository writer can comment:
/ai-review override fable f2f1458417ddc1b30c0a24449ab49b22dc775c79: <one-sentence reason>

@github-actions

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — 🔴 changes requested (blocking)

GPT 6.1 found at least one blocking issue that must be resolved before merging f2f1458417ddc1b30c0a24449ab49b22dc775c79. Adjudication produced no [GPT-ADJUDICATED] marker for f2f1458: the adjudication stage FAILED TO RUN (its raw output is in the Adjudication details block -- typically an API or setup error), so no proportionality review took place and GPT's blocking verdict stands unreviewed.

This comment is updated in place on each push.

BLOCKING -- src/kiro_crew/crew_mode.py:105 -- Changing the configured conductor disconnects existing crews

return CONDUCTOR_TEMPLATES | {crew_mode_agent(cfg)}
Trigger: Start Crew Mode with custom conductor A, dispatch workers, then configure conductor B. serialize_slots() → stamp_rows() → _row_is_root() → runs_conductor() stops recognizing A.
Outcome: The existing root loses its Crew Mode classification, its workers reappear in personal lists, and its Workers, Timeline and steer endpoints return not_crew_mode_root.
Anchor: defect
Fix: Preserve existing sessions’ conductor identity independently of the configured conductor for new chats.

BLOCKING -- website/src/pages/chat-sidebar/SessionRow.tsx:1646 -- Crew summaries introduce a second stacked status line

{crewRoot && }
Trigger: A conductor has workers and a running state or last message. CrewRootSummaryLine renders a separate block beneath the title, while the subsequent rowState or last-message branch also renders.
Outcome: The row displays two status lines simultaneously, increasing its height and reducing the sessions visible above the fold.
Anchor: session-row-fixed-height
Fix: Incorporate the crew summary into the existing status or meta line, preserving approval priority.

BLOCKING -- website/src/pages/chat/command-center/CrewWorkerList.tsx:108 -- Crew error surfaces omit the required hand-off decision

{workers.isError && <ErrorNotice message={t('commandCenter.workers_error')} />}
Trigger: A Workers request fails and renders this notice; the Timeline failure branch at CrewTimeline.tsx:92 and worker-panel boundary fallback at SidePanel.tsx:957 have the same omission.
Outcome: Each failure displays a passive notice without recovery hand-off or an explicit draft-protection decision; the custom boundary fallback also replaces the default recovery controls.
Anchor: errors-use-error-notice
Fix: Make the sanctioned decision at all three sites: enable askAgent, or retain the passive notice with a No hand-off comment identifying the concrete draft it protects.

[BLOCK-MERGE] f2f1458
[GPT-REVIEWED] f2f1458
False positive or not applicable? A repository writer can comment:
/ai-review override gpt f2f1458417ddc1b30c0a24449ab49b22dc775c79: <one-sentence reason>

@bolichen97 bolichen97 closed this Oct 21, 2026
auto-merge was automatically disabled October 21, 2026 19:07

Pull request was closed

@bolichen97
bolichen97 deleted the feat/crew-mode-v2 branch October 21, 2026 19:07
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Oct 21, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

Moved to #22876 after the branch was renamed to feat/crew-mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge conflict Branch has merge conflicts with its base — author must resolve before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant