Skip to content

feat(claude): show child thinking, grandchildren, title and hints - #37870

Open
KiroCrewCaptain wants to merge 1 commit into
mainfrom
feat/claude-acp-gaps-followup
Open

KiroCrewCaptain wants to merge 1 commit into
mainfrom
feat/claude-acp-gaps-followup

Conversation

@KiroCrewCaptain

@KiroCrewCaptain KiroCrewCaptain commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Problem / Motivation

Goal: On the Claude backend, the dashboard shows the rest of what claude-agent-acp sends: a native child agent's thinking on its card, the agents a Crew subagent starts under that subagent's card, the session title Claude Code generates, and each slash command's argument hint.

Closes #37141's remaining half. #37512 shipped the first half. These four were still dropped on agent.acp_backend = "claude":

What Claude does What the dashboard shows on main
A native Agent-tool child streams its thinking nothing (_child_text returns "" for thought chunks)
A Crew subagent running on claude starts its own Agent-tool children or Workflow agents nothing (the run loop drops EVENT_SUBAGENT_LIST / EVENT_SUBAGENT_ACTIVITY)
session_info_update.title ignored; a chat whose Crew title call failed keeps the echo of its first prompt
available_commands_update input.hint dropped at _note_advertised_commands; the / menu shows no argument syntax

Why it matters

A person running Crew on the Claude backend cannot see what a child agent is reasoning, cannot see or stop the agents a Crew subagent starts, and gets a sidebar title that just repeats their first message whenever Crew's own title call fails. The / menu lists Claude Code's commands without saying what arguments they take.

Not a goal

  • Picking a Claude Code custom agent (the adapter's agent config option). A switch replaces the main-thread persona and can apply the agent definition's permission mode, MCP servers and hooks, which Crew does not observe mid-session. Crew keeps not reading or writing it; the spec records why.
  • Replacing Crew's own title generation on claude. Crew stays the title owner; the adapter's title only replaces Crew's echo fallback.
  • Nesting Crew's own nested runs (they stay flat), or showing grandchildren on any backend other than claude.
  • Persisting or replaying a child's thinking across reconnects (same contract as chat_thinking).
  • Permission option labels, ExitPlanMode choices, toolName as a trusted identity, prompt suggestions, image bytes in tool results, ACP v2: still out of scope, as in Claude backend: show the ACP surfaces the dashboard drops (Workflow agents, background tasks, checklist, retries, images, mode) #37141.

What changed (motivation → approach → change)

Each gap had the same root: the frame reached AcpClient and a reader dropped it. Each fix adds one reader behind its own positive ACP_BACKENDS_* set (claude only) on the seam the Kiro path already uses, and nothing Crew trusts or auto-approves changes.

  • Child thinking (fix(signing): Authenticate CDSigner requests with awscurl (SigV4) #10). acp/native_child_thinking.py turns a tracked child's agent_thought_chunk into EVENT_SUBAGENT_THINKING (ACP_BACKENDS_NATIVE_CHILD_THINKING). chat_turn/native_cards.py stream-redacts it per card (redactors capped at NATIVE_CHILD_ROSTER_CAP, overflow counted and logged) and sends subagent_thinking {id, slot, text} to subagent subscribers. The card shows it in the existing ThinkingBlock, collapsed, above Output, capped at 20k characters client-side. Never persisted or replayed, like chat_thinking.
  • Grandchildren (feat: unify artifacts library UI + session-origin Source column #13). subagent_manager/native_child_cards.py gives a claude Crew run (ACP_BACKENDS_RUN_NATIVE_CHILD_CARDS) its own bounded tracker (64 cards) fed through the chat's own reconcilers, with ids native:<run>:<child>. dashboard/run_native_card_relay.py relays the four card frames into the root tab. Stop goes to the run's own AcpClient and ends the run's wait on that child's pending approval; a run's terminal path closes its open grandchild cards before its own subagent_done; reconnect replays them. The Subagents panel indents them one level under their run (website/src/utils/subagentNesting.ts). Crew depth, counting, continuation and approvals are unchanged: grandchildren are display-only.
  • Session title (docs(release): add CLI (Linux/EC2) distribution section #15). acp/harness_title.py keeps the session's own latest session_info_update.title (256 characters, control characters spaced, redacted). After Crew's whole chat_done title chain, dashboard/chat_title_harness.py puts it in place of the title only when that title is exactly Crew's echo fallback and the candidate passes Crew's own title validator (ACP_BACKENDS_SESSION_TITLE). A model, user, member, pinned or fork title is never replaced; chat_title.py and chat_send.py are untouched.
  • Command hints (sync: MeshClaw dual-repo beta sync 2026-07-18/19 (60 ported: 37 backend + 24 frontend) #18). client_transport.bounded_commands, the command-list bound main already has, now also keeps each command's input.hint (stripped, scrubbed, cut to 160 characters; no key when absent). The / menu shows the hint as muted text on the chat's own session rows only, on AcpClient and on the shared runtime alike.
  • Custom agents. Not offered; claude-code-provider.md says why, and a pin test checks Crew never writes config id agent.

Specs updated in the same commit: claude-code-provider, acp-client, subagent, harness-parity, harness-onboarding, learn-cron-dashboard, history.

Backwards compatibility

Compatible: every reader is new and gated on a claude-only set; other backends take exactly main's paths. A stored command row gains an optional hint key; readers that do not know it ignore it.

Removes nothing: no key, route, frame, row or bound is removed or tightened.

Tests

New: test_acp_advertised_command_rows.py, test_claude_session_title.py, test_chat_title_harness.py, native-child thinking and run-card tests, SlashCommandMenu.hint.test.tsx, ActivityViewer.thinking.test.tsx, subagent nesting tests. Locally on the head: the related backend set (8252 passed), tsc clean, 88 related vitest files (1314 passed); black, isort, flake8, mypy, file-line cap, agent-sdk boundary, comment history, brand name and harness parity all pass.

Proof: not provable -- other: four features; each new test asserts a frame or row main never produces

Manual verification

Live smoke on an isolated pod (claude backend, claude-agent-acp 0.107.0): pending. One scenario script per gap is ready; results will be posted as a PR comment.

Screenshots / video

Rendered from the real components with fixture data through the repo's capture harness (website/capture/, vite + Playwright, loopback only).

The / menu: session commands with an argument hint (/loop, /debug) beside rows without one.

slash menu hint, dark

slash menu hint, light

A native child card: its reasoning collapsed above Output, then expanded.

child card, reasoning collapsed

child card, reasoning expanded

Grandchild cards indented one level under the Crew subagent run that started them; the next run is back at the top level.

grandchildren nested, dark

grandchildren nested, light

Related Issues

Closes #37141

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title
  • 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

Contributed under the project's Apache-2.0 license.

@KiroCrewCaptain
KiroCrewCaptain requested a review from a team as a code owner November 16, 2026 07:20
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Sensitive Change Review

Sensitive files changed:

@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

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

UX-Verdict: PASS

The blind read was unavailable: all six screenshots were admitted, but the first pass stopped before describing any of them. Re-run this workflow to get a comprehension read of the hint, thinking and nesting surfaces.

Evidence gaps

  • Blind read unavailable for shot-01 to shot-06 (the slash-command hint, child thinking collapsed and expanded, grandchild nesting). Re-running the workflow on the same attachments closes this; the author doesn't need to do anything.

Notes

  • SlashCommandMenu.tsx: the hint span sits before the description and only shrinks down to max-w-[45%], so a long hint like /loop's takes space from the description first. Consider putting the hint after the command name inline (/loop <interval> <prompt>), so the description keeps its width on narrow composers.

[UX-REVIEWED] 3dd5eff

Description read

[DESCRIPTION-READ] d59bd065fa71b962fab56f14c26e73f91ab1f789a04a0702293350a79885fa8e

That sha256 names everything this verdict read: the PR description, plus the 9 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 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks: each reader is gated on its own claude-only ACP_BACKENDS_* set, the new cards are display-only, and rendered evidence covers all three reshaped surfaces.

Notes

  • The live claude-agent-acp smoke is still "pending". CI never runs the real adapter, so post those results before merge. This matters most for the approval change in subagent_manager/run.py: a claude subagent's tool approval now goes through unless_withdrawn, so a mistake there would deny or hang real approvals, not just a card.

[DESIGN-REVIEWED] 3dd5eff

Description read

[DESCRIPTION-READ] 18ea0022e023ff1a1c61c690b071833e2d0fab4446d3a53098e402374308d287

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

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 3dd5eff2ecc554d11e09318397dba7673e8176e5 — 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: PASS

Nothing blocks. All four readers are new, run only on the claude backend (ACP_BACKENDS_*), and trace to #37141. Every other backend keeps main's paths.

Not checked: the claude-agent-acp 0.107.0 session_info_update title behaviour and summary fallback the title adoption relies on (live smoke still pending).

What this change ships

Inventory (8 items) — 7 justified

Intent: let a person on the Claude backend see the rest of what Claude Code sends (child thinking, grandchild agents, the session title, command argument hints). ADDITION; it closes #37141's remaining half.

  1. A native child card shows that child's reasoning, collapsed, above Output — justified
  2. Agents started by a Crew subagent on claude show as cards indented under that subagent's card — justified
  3. Stop on a grandchild card stops it through the run's own client and ends the run's wait on its pending approval (reuses harness_stops_native_child) — justified
  4. Grandchild cards close when their run ends and come back on reconnect — justified
  5. On claude, a chat whose Crew title failed now shows the harness's session title instead of an echo of the first message — justified
  6. The / menu shows each command's argument hint as muted text — justified
  7. Stored advertised-command rows gain an optional hint key — justified
  8. A pin test checks Crew never writes the adapter's agent config option — rides along; it pins the stated non-goal

[FIRST-PRINCIPLES-REVIEWED] 3dd5eff

Description read

[DESCRIPTION-READ] ed81901ab2853380323c71e28818b73d5f8184c3d9663192de78b934c4107f18

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

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 3dd5eff2ecc554d11e09318397dba7673e8176e5 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 3dd5eff

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 3dd5eff2ecc554d11e09318397dba7673e8176e5 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 3dd5eff

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

False positive or not applicable? A repository writer can comment:
/ai-review override fable 3dd5eff2ecc554d11e09318397dba7673e8176e5 false-positive: <reason, 20 to 500 characters>

@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 Nov 16, 2026
@KiroCrewCaptain
KiroCrewCaptain force-pushed the feat/claude-acp-gaps-followup branch from 8365d6f to 89b2ab5 Compare November 16, 2026 09:43
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 16, 2026
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator Author

Sensitive change review

  • Head commit: 89b2ab5
  • What rule changed: security_posture.NON_EGRESS_REDACTION_MODULES lists two new modules that redact before a non-egress sink: acp/harness_title.py (the harness session title, redacted as the client reads it) and subagent_manager/native_child_cards.py (a Crew run's child card text and tool line, redacted before the subagent output boundary). No sandbox, tool-gate, command-floor or secret-scrub rule changes.
  • Before -> after (what was allowed/blocked, now): Nothing allowed or blocked changes. Before, the posture inventory did not name these two modules (they did not exist on main); after, it names them, so the posture tests require each to call the redactor.
  • Worst case if wrong (breaks commands / leaks secret / locks user out): A listed module that stopped redacting would let a credential in a harness title or a grandchild card's text reach the dashboard; the inventory tests fail first, since they check every listed module calls the redactor.
  • Evidence checked (which sandbox result proves it): N/A: no sandbox path changed. The redaction itself is covered by test_claude_session_title.py (token in a title redacted) and test_claude_run_native_child_cards.py (card text and tool line redacted).
  • No regression:
    • Tools still work (which tools/commands were run, result): N/A for tools (no gate or sandbox touched); test_security_posture.py and test_security_posture_facade.py pass on this head.
    • Backward compatible (old config / old data / old callers still work, how checked): A frozenset gains two entries; no reader of the set changes; no config or data shape changes.
    • Existing tests (which suites passed on this head): 152 related backend test files plus the guard files (8252 passed), tsc, 88 related vitest files (1314 passed), mypy, flake8, black, isort, file-line cap, agent-sdk boundary, comment history, brand, harness parity, docs-lint.
  • How to undo: Revert the two added entries (or revert the commit); nothing else reads them.

@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 Nov 16, 2026
On agent.acp_backend = "claude" the dashboard still dropped four things
claude-agent-acp sends (the second half of #37141):

- A native Agent-tool child's agent_thought_chunk now becomes
  EVENT_SUBAGENT_THINKING and streams to that child's Subagents card as
  a collapsed reasoning block (subagent_thinking, stream-redacted per
  card, ephemeral like chat_thinking).
- A Crew subagent running on claude now draws the Agent-tool children
  and Workflow agents its own session starts as one-level nested cards
  under its card (native:<run>:<child>), with Stop routed to the run's
  own client, reconnect replay, and close-before-done on every terminal
  path. Crew depth, counting and approvals are unchanged.
- session_info_update.title replaces only Crew's own echo fallback
  title after Crew's chat_done chain; a model, user, member, pinned or
  fork title is never replaced.
- An available_commands_update command's input.hint reaches the
  composer's / menu, bounded where the command list is stored.

Each reader is gated on a new positive ACP_BACKENDS_* set. Picking a
Claude Code custom agent stays unoffered: a switch can apply an agent
definition's permission mode, MCP servers and hooks, which Crew does
not observe mid-session; the spec records why.
@KiroCrewCaptain
KiroCrewCaptain force-pushed the feat/claude-acp-gaps-followup branch from 89b2ab5 to 3dd5eff Compare November 16, 2026 11:04
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator Author

Sensitive change review

  • Head commit: 3dd5eff
  • What rule changed: security_posture.NON_EGRESS_REDACTION_MODULES lists two new modules that redact before a non-egress sink: acp/harness_title.py (the harness session title, redacted as the client reads it) and subagent_manager/native_child_cards.py (a Crew run's child card text and tool line, redacted before the subagent output boundary). No sandbox, tool-gate, command-floor or secret-scrub rule changes.
  • Before -> after (what was allowed/blocked, now): Nothing allowed or blocked changes. Before, the posture inventory did not name these two modules (they did not exist on main); after, it names them, so the posture tests require each to call the redactor.
  • Worst case if wrong (breaks commands / leaks secret / locks user out): A listed module that stopped redacting would let a credential in a harness title or a grandchild card's text reach the dashboard; the inventory tests fail first, since they check every listed module calls the redactor.
  • Evidence checked (which sandbox result proves it): N/A: no sandbox path changed. The redaction itself is covered by test_claude_session_title.py (token in a title redacted) and test_claude_run_native_child_cards.py (card text and tool line redacted).
  • No regression:
    • Tools still work (which tools/commands were run, result): N/A for tools (no gate or sandbox touched); test_security_posture.py and test_security_posture_facade.py pass on this head.
    • Backward compatible (old config / old data / old callers still work, how checked): A frozenset gains two entries; no reader of the set changes; no config or data shape changes.
    • Existing tests (which suites passed on this head): the related backend set (8252 passed before the last rebase; 419 re-run on this head incl. test_security_posture*), tsc, 88 related vitest files (1314 passed), mypy, flake8, black, isort, file-line cap, agent-sdk boundary, comment history, brand, harness parity, docs-lint.
  • How to undo: Revert the two added entries (or revert the commit); nothing else reads them.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 16, 2026
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator Author

This changes behaviour users already rely on, so it needs a design sign-off from a maintainer before it can merge. A maintainer will post the decision here.

Review result on this head: no blocking findings. Child thinking, slash-command hints and the echo-only title adoption fit groups (5) and (6) of the decision recorded on #37141. The grandchildren part is different. It covers run child cards, the root-tab relay, Stop routing to the run's client, the unless_withdrawn approval wait-end and one level of nesting in the Subagents panel. It replaces main's documented rule that a claude run's children draw nothing on its card, and no row of #37141 covers it. That part is what needs the sign-off. #37141 is already closed, so "Closes #37141" could become "Part of" or point to a new issue.

What the review checked: every new reader sits behind a positive claude-only ACP_BACKENDS_* set. Child thought text is stream-redacted per card and sent only to slot-scoped subscribers. unless_withdrawn can only answer False, and only on an explicit card Stop for a request id the run's own client recorded for that child. The kiro path stays a plain await. The new tests are deterministic, and reverting the main production hunks turns at least one test red. The Stop test runs a real AcpClient and SubagentManager._run_inner, and proves that only the child's request is rejected while the run's own request is still approved.

Optional:

  • docs/system-specs/modules/claude-code-provider.md adds a "Claude Code custom agents" rule, plus a pin test, saying Crew never writes _meta.claudeCode.options.agent. The Goal does not need this rule, and it rules out open PR feat: start claude main thread as the spec's claudeCodeAgent #31146. The test also checks only a client with no spec, so a spec-driven write would stay green.
  • Open PR fix(chat): show a native sub-agent's work live on its card #20034 adds the same subagent_thinking frame with a different client rendering. Naming one owner for the frame and its reducer would save the second PR to merge from redefining it.
  • The live claude-agent-acp 0.107.0 smoke is still listed as pending, with no results comment on this head. A result for Stop on a grandchild that is waiting for approval would help most.

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 16, 2026

This branch has not been deployed

No deployments
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 readiness: passed Eligible automated validation passed for the current revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Claude backend: show the ACP surfaces the dashboard drops (Workflow agents, background tasks, checklist, retries, images, mode)

2 participants