Skip to content

feat(dashboard): show what each session actually runs - #16906

Open
ash663 wants to merge 2 commits into
kirodotdev:mainfrom
ash663:feat/dashboard-session-truth
Open

ash663 wants to merge 2 commits into
kirodotdev:mainfrom
ash663:feat/dashboard-session-truth

Conversation

@ash663

@ash663 ash663 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: The chat composer names the backend, model, reasoning effort and crew a live session actually runs, and says when the session runs without Kiro Crew's own tools; each reply's footer names the model that turn actually ran.

The composer's chips are predictions: config before a session's first turn, then the model the session selected rather than the one that ran. The effort label is the level Crew asked for, never read back, and nothing names the session's ACP backend. On main:

  • A Claude session pinned to Fable ran claude-fable-5. After its turn the chip read auto · Max.
  • A second Claude session in the same project ran global.anthropic.claude-opus-5-5[1m] at the adapter's default effort, without the session's MCP servers. Its chip read auto · Default · High, with no sign that the tools were missing.

Why it matters

Model and effort are picked for cost and quality. A label naming something other than what ran hides a pick, pin or effort override that did not take. A session without Kiro Crew's tools fails every task that needs them, and nothing on screen says why.

Not a goal

  • Changing what Crew sends a harness. Where a session runs something other than what was asked, this PR shows it and leaves the cause alone.
  • A per-turn model for kiro-cli under Auto: it is not on the wire, so the chip keeps auto.
  • New harness names: the chip uses the labels Settings → Agent Harness shows.
  • A new composer control. The backend name rides on the existing model chip, and model and effort stay one control.

What changed (motivation → approach → change)

The composer names what each live session reports running: its harness, model, effort and crew. The chips named config or the selection because the slot kept only served_model, the id a session selected, so each session now records what it reports, beside that field. The slot records it when eager spawn registers the session, when a turn starts on a new or reloaded session, when a turn ends, and after a live model or effort change. Teardown forgets it with served_model, and like that field it is display-only.

Slot field Where it comes from
turn_model the prompt response's _meta.quota.model_usage row with the most tokens (parse_prompt_turn_model), redacted whole, then capped at 200 characters; claude-agent-acp and codex-acp report it, kiro-cli does not
served_effort the effort option's currentValue in the configOptions the session already caches; codex's [effort] model-id suffix when it advertises no effort option; on kiro-cli, which reports no level, Crew's own record: the level last pushed live with /effort (a fallback swap carries one without storing it), else the overlay's. Kept only when it is an effort name
served_backend, served_agent the provider's backend, in the config spelling the SPA reads (kiro for kiro-cli), and the crew it runs as

The model chip leads with the harness logo, drawn by the HarnessLogo Settings → Agent Harness uses, and shows the reported model, with the selection in its title when they differ. The effort label shows the reported level. Until a session reports, the chips keep today's prediction.

Whether Crew's tools reached a session is read off its existing mcp_report (gatewayToolsState). kirocrew-core alone decides, because a spec may leave out kirocrew-cron on purpose, as the conductors do. When it was not sent, failed to start or gave the session no tools, the agent chip says No Kiro Crew tools, and the context popover says what happened and what to do next:

State Popover
not sent warning: add @kirocrew-core to the agent's tools under Customize → Custom agents, then start a new session
gave no tools warning: another server likely uses the same tool names; turn it off, then start a new session
failed to start error: start a new session to try again
reached it Available, Sent, not confirmed or Not reported yet

On a phone the shelf wraps around the warning, and the popover stays 8px inside the viewport.

The turn, abnormal-turn and Slack cron footers name the model the harness reported (read_reported_turn_model). The usage record keeps the resolved id (read_turn_model), so one model's usage history does not split across two spellings.

The sidebar's crew marker prefers served_agent. A warm-pool claim sets the pooled provider's own crew to the claiming crew, so served_agent names that crew, and a restart of the session is governed as that crew too, as a cold start is. model-selection.md, providers.md, acp-client.md and turn-stats-footer.md say where each fact comes from.

Where it lives: the turn's model is parsed in acp/_dispatch.py and kept by acp/client_usage.py and acp/session_handle_turn.py; the provider's readers are in providers/acp.py, providers/base.py and providers/acp_model_effort.py, whose live effort record providers/acp_lifecycle.py resets on a restart; the slot fields and where they are recorded are in state_parts/slot_session.py, chat_turn/model_fallback.py, chat_turn/turn_stats.py and chat_turn/eager_spawn.py; the footers' reader is in handlers/usage.py, which gateway_runtime/cron_turn.py calls for the cron footer; a warm-pool claim reports the claiming crew in session_allocation_parts/get_or_create.py. In the SPA, lib/mcpSessionReport.ts, lib/model.ts and types/index.chat.ts derive the state; chat-input/ContextShelf.tsx, components/HarnessMark.tsx, page/ComposerDockView.tsx, chat-sidebar/SessionRow.tsx and utils/agentLabel.ts render it; locales/en.manual.json and every other catalog carry the labels.

Backwards compatibility

Compatible: the four slot fields are additive and every existing field keeps its value; the SPA falls back to the configured prediction while a field is absent or null.

Removes nothing: no key, record, validator or path is removed or tightened.

Tests

Each of these fails on the parent commit unless it says otherwise.

  • test/test_session_facts.py (new): the turn-model parser, its redaction before the cap and its reset; claude, kiro and codex effort; a reported level that is no effort name, a 70 KB one included; no effort channel; crew vs spec agent; record and forget.
    • test_kiro_effort_carried_to_a_fallback_model_is_the_level_it_runs_at: a kiro-cli set_model to a fallback with no stored level reports the level it pushed live, and the next switch carries none. It fails without the live record ('' == 'high').
    • test_the_footer_names_the_reported_model_and_the_usage_row_the_selected_one runs one _run_chat turn whose harness reports a model the session did not select: the usage row keeps the selected id and the footer names the reported one.
    • test_the_spa_reads_tools_off_the_same_servers_and_harnesses parses the SPA's mirrored names and fails when either side moves alone.
  • website/src/test/mcpSessionReport.test.tsx: gatewayToolsState per harness, including a roster without kirocrew-cron, which reads sent on claude and connected on kiro-cli.
  • website/src/test/ChatInput.sessionFacts.test.tsx: the logo on every shelf width, the popover inside a 390px viewport with the full served id, the shelf wrapping around the warning, and each state's text and role (status for a warning, alert for a failed start).
  • test_acp_runtime_session_handle.py, test_chat_slot_reasoning_effort.py, test_eager_spawn.py, test_session_pool.py (a warm-pool claim reports the claiming crew), test_chat_slot_facade_contract.py, test_acp_bindings.py, model.chipMarker.test.ts, useChatPageComposerChips.test.tsx, ChatSidebar.effectiveAgent.test.tsx.

On this head: the touched backend modules, the composition and bindings contracts and every effort suite (2,387 tests) pass, and so do the touched vitest files and every i18n suite (59 files, 1,144 tests). tsc, eslint, black, isort, flake8, mypy, i18n:check, lint:i18n, semgrep on the diff and the flake-pattern ratchet are clean. test_session_facts.py passes 20 runs at -n0, 10 at -n 4 beside two sibling files, and the touched backend files' 518 tests in a shuffled order (seed 589).

Gate proof: tree ce4564f8deb6; ran 24; skipped none

Manual verification

The built SPA, served without a gateway, every API call answered in the browser with the slots stubbed per state. At 390x844 the shelf does not overflow, and the context popover spans x=104 to x=312 in each warning state. At 1440x900 every popover is inside the viewport too. The measured texts match the table above.

The hover titles, which the browser draws and a screenshot cannot show:

  • Agent chip, tools missing: Agent: default · This session has no Kiro Crew tools
  • Model chip when the harness ran another model than the selection: Model: global.anthropic.claude-opus-5-5[1m] · Selected: fable · Reasoning effort: Default · Agent harness: Claude Code
  • A reply footer: Turn took 7.9s ($0.2311 API cost) · model: global.anthropic.claude-opus-5-5[1m]

Screenshots / video

Tools not sent, on a phone (a Claude Code session): the shelf with the warning, then the context chip tapped; then a kiro-cli session whose kirocrew-core gave it no tools:

Tools missing on a phone: not sent, then no tools

kiro-cli at 1440x900, the context popover per state: available, not reported yet, failed to start, and gave no tools:

kiro-cli tools available, not reported yet, failed to start, and gave no tools

What a session reports: a Claude Code session whose harness reported another model than its selection, with the chip's title printed in the white box and the context popover open; that reply's footer; a sidebar row whose session runs as another crew; and the model chip per harness:

Reported model with the selection in the chip title, a reply footer, the sidebar marker and the harness marks

Related Issues

The first live run of this change surfaced two defects it reports but does not fix; both are fixed on main: #16782 (a second Claude session in one project was refused the shared settings seed, so its MCP servers were withheld) and #16783 (an effort keyed under the configured model spelling was missed under the advertised one).

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

@ash663
ash663 requested a review from a team as a code owner October 5, 2026 05:31
@ash663
ash663 requested a review from chenmingwei23 October 5, 2026 05:31
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: action required A blocking check or review needs attention labels Oct 5, 2026
@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

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

UX-level review of 6435bfb20d36c956e43f9e3d0165ee4dc2955f2c via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

The "No Kiro Crew tools" warning sits on the agent chip, but the steps to fix it live in the Context-window popover, a different control. A user who sees the warning has no visible way to learn what to do.

Blockers

The fix is hidden away from the warning
Trigger: a session's gatewayToolsState is not_sent, no_tools or failed. The agent chip then shows a warning icon and "No Kiro Crew tools" (attachments 01 and 02).
Outcome:

  • Clicking the warned chip runs onAgentClick, which opens the agent picker.
  • The chip's title adds only "This session has no Kiro Crew tools", which repeats the warning and gives no next step.
  • The guidance ("Add @kirocrew-core to this agent's tools under Customize → Custom agents…", "Turn that server off…", "Start a new session…") renders only inside ContextUsageControl. That is the context-percentage bar at the other end of the shelf, a control about token usage.
  • That control is gated {contextPct != null && (…)}. The code says the chip warns "before the first turn". If no context readout exists at that point, the guidance is not reachable anywhere.
  • Result: the user knows the tools are missing but not why or what to do, and every task that needs those tools keeps failing.

Severity: rare state × the task fails with no recovery path × happens every time the state occurs.

Fix: show the state's guidance where the warning is. Put the GATEWAY_TOOLS_LABEL_KEY sentence in the agent chip's title and accessible name and at the top of the agent picker, or make the warning segment open the notice. It must not depend on contextPct.

Notes

  • Only the selected model's name and the harness logo show on the model chip in attachment 03. No screenshot shows the effort segment ("· High") with a level the session reported, or the segment that hasEffort={… || !!served_effort} newly adds on a harness with no effort control. Add one still of each.
  • gateway_tools_no_tools says "Turn that server off" without naming the server. If the report holds the name of the server that clashed, put it in the sentence.
  • This lane has no blind read, so whether a first-time user understands "Agent harness" and "Sent, not confirmed" has not been tested. Pushing the branch to this repository enables that pass.

[UX-REVIEWED] 6435bfb

Description read

[DESCRIPTION-READ] f6cf3dcb92b260c618e470269acc819c9071bac947000003230708fa9dee300f

That sha256 names everything this verdict read: the PR description, plus the 6 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 Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

Design-level review of 6435bfb20d36c956e43f9e3d0165ee4dc2955f2c via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the new slot fields only add display data, nothing is removed, and three committed screenshots cover the new composer surface.

Notes

  • The warm-pool _crew_agent = claim_crew rebind in get_or_create.py changes governance as well as the sidebar label. acp_runtime_start.py:615 governed_agent = self._crew_agent or agent now judges a restarted pooled session as the claiming crew. Matching a cold start is right, but this is a governance fix inside a display PR: split it into its own PR or name it in ## Backwards compatibility.

[DESIGN-REVIEWED] 6435bfb

Description read

[DESCRIPTION-READ] e4f7036ddd7151e81981cb27630d70b485acd8e13ca9ed0b1612c584a96940a4

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 Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5, fork) — ✅ PASS

Premise-level review of 6435bfb20d36c956e43f9e3d0165ee4dc2955f2c via the fork AI-review pipeline — 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. One rider goes past the display-only Goal: the warm-pool crew rebind changes which crew a restarted session is governed and spawned as.

Notes

  • Item 8 — oversized: the Goal is labels, and ## Not a goal says "Changing what Crew sends a harness". But cast(Any, provider)._crew_agent = claim_crew feeds governed_agent = self._crew_agent or agent and crew_agent=self._crew_agent in providers/acp_runtime_start.py:590,615. So a pool-claimed session that restarts is now governed and spawned as the claiming crew instead of the pool spec. That is a governance change carried in a display PR. Subtraction: delete the rebind in session_allocation_parts/get_or_create.py, and have session_agent read the crew that client.rekey(..., crew_agent=claim_crew) already stores on the handle and runtime (session_provider.py:1157).
    Clears when: the mechanism is removed, or a human amends the Goal.

What this change ships

Inventory (10 items) — 7 justified

Intent: let a person see which harness, model, effort and crew a live session actually runs, and whether it has Kiro Crew's tools. This is a FIX.

  1. Model chip names the model the harness reported for the last turn, with the selection in its title — justified
  2. Model chip leads with the harness logo; the popover names the backend — justified
  3. Effort label shows the session's reported level (kiro-cli: Crew's live /effort record) — justified
  4. Agent chip and sidebar crew marker prefer the crew the session reports — justified
  5. Agent chip warns "No Kiro Crew tools"; the popover gives a per-state next step — justified
  6. Turn, abnormal-turn and Slack cron footers name the reported model; the usage row keeps the resolved id — justified
  7. Chips switch from prediction to reported values at eager spawn, before the first turn — justified
  8. Warm-pool claim rebinds the provider's crew, so restarts are governed as the claiming crew — oversized, out of Goal
  9. Model chip hides the routing prefix (global.anthropic.) from the visible name — undeclared
  10. "Default" effort marker now keys on the effective effort instead of the configured default — undeclared

[FIRST-PRINCIPLES-REVIEWED] 6435bfb

Description read

[DESCRIPTION-READ] ca5819d1808e4dd9afd01b3a0d80a0e4c70b26a907ba21fd06a2c1e33b8b5003

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 Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — 🔴 changes requested (blocking)

Reviewed 6435bfb20d36c956e43f9e3d0165ee4dc2955f2c via the fork AI-review pipeline; updated in place on each push.

Blocks: the session facts this PR adds stay on the slot after their session is gone, and the composer now ranks them above what the user just picked. After an unclaimed resume prefetch expires, picking a different model or effort keeps showing the dead session's model, effort, harness and agent.

BLOCKING — src/kiro_crew/dashboard/state_parts/slot_session.py:722

def record_session_facts(self: _ChatSlot, *, turn_model: str, backend: str | None, agent: str | None, effort: str | None) -> None:
const shownModel = session.selected || displayModel(...)   /   const effectiveEffort = currentSlot?.served_effort ?? (currentSlot?.reasoning_effort || ...)

Trigger: opening a past chat runs _spawn_admitted_prefetch, which now calls _sync_served_model and writes served_model, served_effort, served_backend and served_agent. Nobody sends a message, so _prefetch_ttl → sessions.remove_if_unclaimed removes the session. Nothing on that path calls back into the slot, so forget_session_model_state never runs. The _cap_armed_prefetches eviction right after the new sync, and the idle sweep, leave the slot the same way. The user then picks a new model or effort. The handler finds no live provider, so _reset_slot_session gets reloaded=False, skips forget_session_model_state, and pushes the slot with the old facts still on it.

Outcome: the model chip names, and the picker highlights, the dead session's model instead of the new pick. Before this change the pin won and served_model was used only when the pick resolved to auto; now reportedModel puts it first. The effort chip shows the old served_effort, and the harness logo and agent label stay on the old session's values. All of it persists until a new session reports. These facts have no session-identity check, unlike the MCP report, which _drop_orphaned_mcp_report drops when its session id stops matching.

Anchor: defect

Fix: stamp the facts with the provider's session_id in record_session_facts, and null them in the slots projector when the live session's id does not match, the same way _drop_orphaned_mcp_report does. Also skip the eager-spawn publish when sessions.get_provider(session_key) is not provider after _cap_armed_prefetches.

[BLOCK-MERGE] 6435bfb
[OPUS-REVIEWED] 6435bfb

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings

Reviewed 6435bfb20d36c956e43f9e3d0165ee4dc2955f2c via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 6435bfb

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 5, 2026
@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 5, 2026
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 6, 2026
@bolichen97
bolichen97 force-pushed the feat/dashboard-session-truth branch from 48d9db0 to b83ed1e Compare October 6, 2026 10:01

Copy link
Copy Markdown
Contributor

Rebased onto main @ cc7e798 (old head 48d9db084f → new head b83ed1e73d, force-with-lease).

Three files conflicted, all mechanically: #17245 replaced !selectionCapabilitiesQ.isError with selectionCapabilitiesFailed(selectionCapabilitiesQ) right next to lines this PR adds.

  • website/src/components/ChatPane.tsx, website/src/pages/chat/page/composerChips.ts: kept this PR's chipModel/modelSelected lines and its lib/model imports, and used main's selectionCapabilitiesFailed(...) gate (plus its import).
  • website/src/test/useChatPageComposerChips.test.tsx: kept both describe blocks (main's 404 effort-gate test and this PR's live-session tests).

Range-diff: commit 2 is identical; commit 1 differs only in those three files.
Checks: py_compile is ok on all changed .py files. pytest passed on test_session_facts, chat_slot_facade_contract, chat_slot_reasoning_effort and eager_spawn (208 passed). test_acp_runtime has the same 54 failures as on clean main, so this rebase did not cause them. vitest passed on the 5 related suites (55 tests). tsc --noEmit is clean.

Please pull with git fetch && git reset --hard origin/feat/dashboard-session-truth before you push again.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Oct 6, 2026
@ash663
ash663 force-pushed the feat/dashboard-session-truth branch from b83ed1e to 449e500 Compare October 6, 2026 18:07
@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 22, 2026
@iamwhatever
iamwhatever force-pushed the feat/dashboard-session-truth branch from 0cfc46b to 251c7aa Compare October 22, 2026 02:33
@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 22, 2026
@iamwhatever
iamwhatever force-pushed the feat/dashboard-session-truth branch from 251c7aa to 33dc399 Compare October 22, 2026 03:11
@ash663

ash663 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto main @ f454c08 (old head 33dc3996b5 -> new head 82f33f9d45, force-with-lease pinned to the old head; the old head is kept as tag pre-rebase/16906). Two commits, as before: 7b92a35dbc (the feature) and 82f33f9d45 (the maintainer's follow-up, author kept).

main moved the chat turn into owner modules since the last port, so these hunks were re-applied where the code now lives: the footer model and the end-of-turn fact sync to chat_turn/turn_stats.py (_on_complete), the footer attach to chat_turn/stop_recovery.py, the abnormal-end footer to chat_turn/turn_reply_seams.py, and the reported-model stubs to the 16 read_turn_model stubs of the moved test_chat_runner_abnormal_turn_usage.py. sessionAgentLabel passes main's new agent_kind through, so a template pick keeps its display name. Two test fixtures follow main: codex's harness name is OpenAI Codex, and the respelt-pin case uses a model the registry does not list, since main's registry now folds global.anthropic.claude-opus-5-5[1m] into claude-opus-5.5.

Main's HarnessLogo (#22882) now draws every harness's mark, so the model chip renders through it: this PR adds no mark asset, and the chip shows the same logo as Settings → Agent Harness for every harness, codex and opencode included.

The HOLD items and the two blocking findings on 33dc3996b5 are answered one per comment below. The three stills are recaptured on this head and the description links them at 82f33f9d45.

@ash663

ash663 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: kiro-cli's applied_effort read only the stored level

  • span=722826f4b851 Live fallback effort is reported as the harness default

fixed in 7b92a35: on kiro-cli, applied_effort reads the level last pushed live with /effort before the stored one, so a fallback swap's carried level is what the slot reports.
A model switch and a restart clear that record, so a level never outlives the process or the model it was pushed to.
test_session_facts.py::test_kiro_effort_carried_to_a_fallback_model_is_the_level_it_runs_at pins both, and fails without the record ('' == 'high').

@ash663

ash663 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: gatewayToolsState required every control-plane server

  • span=1d0e5426edbc No-tools warning on a session whose spec leaves out kirocrew-cron

fixed in 7b92a35: gatewayToolsState keys on kirocrew-core alone, so a roster without kirocrew-cron reads sent on claude and connected on kiro-cli; the conductors' specs leave it out on purpose.
mcpSessionReport.test.tsx pins it with the kirocrew-core-only rows, which fail on the old rule; test_session_facts.py pins the SPA's server name to CONTROL_PLANE_SERVERS.

@ash663

ash663 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

Design (HOLD): the description claimed a 64 KB set_config_option cap and a new options store. Fixed in the description. Neither is in the diff: main already caches the configOptions a set_config_option answer carries, and the 64 KB bound was removed on 10-20. The description now says served_effort reads the effort option from the options the session already caches, and that a reported level is kept only when it is an effort name (the 70 KB case in test_an_oversized_reported_level_never_reaches_the_slot).

@ash663

ash663 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

First Principles item 10: description claims the diff does not ship. Fixed in the description: the 64 KB bounded_config_options passage and "set_config_option now also stores the configOptions" are gone. What changed and Backwards compatibility now describe only what the diff does.

@ash663

ash663 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

First Principles item 7 / item 8: the footer re-pointing is oversized for a composer-only Goal. Resolved by amending the Goal, on the author's decision: "...; each reply's footer names the model that turn actually ran." The footers are where a person reads what a finished turn ran, and naming the selection there hides the same substitution the chip now shows. The mechanism stays: read_reported_turn_model feeds the turn, abnormal-turn and cron footers, and the usage record keeps read_turn_model.

@ash663

ash663 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

UX: "No tools" overstates the problem. Fixed in 7b92a35: the agent chip says No Kiro Crew tools, the same scope as the popover row, in every catalog. The harness's own tools are not covered by the warning, and it no longer reads as if they were.

@ash663

ash663 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

UX: the not-sent warning gives no next step. Fixed in 7b92a35: "Kiro Crew tools were not sent to this session. Add @kirocrew-core to this agent's tools under Customize → Custom agents, then start a new session." With kirocrew-core as the signal, the warning fires only when that server is missing, so the step it names is the one that adds it.

@ash663

ash663 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

UX suggestion: "Sent, not confirmed". Adopted in 7b92a35 for every catalog. It names what is known (the tools were sent) and what is not (no confirmation), drops "harness", and fits one line of the 208px popover.

@ash663

ash663 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

UX: no blind read. Not something this PR can supply: the fork UX lane has no blind-read pass by design, and only ux-review.yml on a same-repo branch runs one. Every control the diff adds or changes has a still at 82f33f9d45: the agent chip's warning, each tools state of the popover (not sent, gave no tools, failed, available, not reported yet, sent and not confirmed), the "Selected:" title, the footer, the sidebar marker and the harness marks. A maintainer who wants the blind read can push the branch to this repository.

@ash663

ash663 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

UX evidence gap: the no_tools state of the context popover. Fixed: no-tools-phone.png shows it at 390x844 and kiro-cli-tools-states.png at 1440x900, both captured on 82f33f9d45.

@ash663

ash663 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

UX note: the no_tools warning names a cause but no action. Fixed in 82f33f9: it ends "Turn that server off, then start a new session." in every catalog.

@ash663

ash663 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

UX note: the selection shows only in the model chip's hover title. Kept as is. The chip names what ran, which is this PR's point; the selection is one tap away, since the model picker the chip opens highlights it, on a phone too. A second marker would compete with the reported id for the chip's width on a phone.

@ash663

ash663 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

Design note: on kiro-cli, served_effort is not a readback. The spec now says so plainly: kiro-cli reports no level, so served_effort there is Crew's own record, the level last pushed live with /effort, else the overlay's (model-selection.md, providers.md, and applied_effort's docstring), in 7b92a35.

@ash663

ash663 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

Design note: the SPA keeps its own copies of the gateway's server and harness sets. Kept, with a smaller copy: the SPA now mirrors one server name (kirocrew-core) and the self-mounting harness set, and test_the_spa_reads_tools_off_the_same_servers_and_harnesses fails when either side moves alone. A backend-derived state was this PR's earlier shape; First Principles item 5 removed it as a duplicate of mcp_report, which already reaches the SPA between slots pushes.

@ash663

ash663 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

First Principles note: a warm-pool claim's crew rebind also sets the governed agent on restart. Declared in the description; no code change. The rebind is in 82f33f9d45, so session_agent reports the claiming crew instead of the pool's agent spec. A restart reads the same field: providers/acp_runtime_start.py spawns with crew_agent=self._crew_agent and governs as self._crew_agent or agent. So a restarted claimed session is governed as the claiming crew, as a cold start of that crew is; before the rebind, a restart fell back to the pool's agent spec. The Design note on the same rebind has the same answer.

The composer named a session's model and effort from config until its
first turn, and after it from the model the session selected. A harness
can run a model other than the one it accepted, the effort level an
adapter accepted was never read back, and no surface named a session's
ACP backend. A session could therefore run another model, effort or
backend, or run without the gateway's tools, under labels that said
otherwise.

Each session now reports its own facts, recorded on the slot when eager
spawn registers it, when a turn starts on a new or reloaded session,
when a turn ends, and after a live model or effort change:

- turn_model: the model the prompt response's model_usage says served
  the turn (claude-agent-acp, codex-acp), redacted before its cap and
  cleared when a turn starts or the model switches
- served_effort: the effort option's value in the set_config_option
  response (kept only within 64 KB and when it is an effort name), the
  effort suffix of codex's current model id when it advertises no
  effort option, or, on kiro-cli, which reports none, the level Crew
  last pushed live with /effort (a fallback swap carries one without
  storing it), else the level written to its settings overlay
- served_backend and served_agent: the provider's backend, in the
  config spelling the SPA reads ("kiro" for kiro-cli), and the crew it
  runs as

The model chip leads with the harness logo and shows the reported
model, with the selection in its title when the two differ. The effort
label shows the reported level. The agent chip names the crew the
session runs as and warns "No Kiro Crew tools" when kirocrew-core was
not sent or failed to start; a spec may leave out kirocrew-cron on
purpose, so that server alone decides. The not-sent warning says where
to add the server. The context popover lists the harness, the full
served id and the tool state, kept inside the viewport on a phone.
Until a session reports, the chips keep the configured prediction.

The turn and Slack cron footers name the reported model
(read_reported_turn_model); the usage record keeps the resolved id, so
a harness spelling a model its own way does not split that model's
usage history in two.
@iamwhatever

Copy link
Copy Markdown
Contributor

Rebased the author's latest head 82f33f9d onto current main as 781fdcf00, keeping both commits and their authors. The aim is to give the AI review lanes their first read of the 10-31 revision; the branch conflict had blocked those runs.

Conflict resolution only, no new behaviour:

  • ACP: kept main's EngineFallbackTracker / begin_prompt beside this PR's turn_model field and reset, and kept main's launch_tuning import beside this PR's imports. _dispatch.py keeps main's os TYPE_CHECKING import.
  • Frontend: merged the picker / composer / ChatPage prop lists token by token, so main's displayAgents and effortAutoNote sit beside this PR's chipModel / modelSelected. retryThroughRestart is kept.
  • i18n: merged 3-way by key, with no key changed on both sides. en-XA.json was regenerated.
  • One adaptation: main renamed usage._wrapper_chain to wrapper_chain, so this PR's read_reported_turn_model now calls the new name. Without that, test_session_facts.py::test_the_footer_names_the_reported_model_and_the_usage_row_the_selected_one failed with a NameError swallowed into a fallback.

Locally: the 10 touched Python test files (531 tests), tsc, the touched vitest files (102 tests), vitest related on the changed sources (12,735 tests) and the diff-scoped i18n:check all pass.

…tions path

applied_effort finds the effort config option by its id instead of gating on
ACP_BACKENDS_EFFORT_VIA_CONFIG_OPTION (test_backend_cards_advertised). The
helper takes a provider, not self, and the frozen AcpProvider inventory lists
applied_effort, session_agent and turn_model.

Main already stores the configOptions a set_config_option response carries,
so bounded_config_options only added a 64 KB cutoff (First Principles item 10).
It is removed with its doc bullet. applied_effort still reports only an effort
name, which the rewritten session-facts test pins for a 70 KB level.

gatewayToolsState no longer reads kirocrew-core listed in no_tools as
'connected': it returns 'no_tools', which the agent chip warns on and the context
popover explains with a warn-status notice (GPT 6.1 Review F2). The notice ends
with the next step: turn that server off, then start a new session.

A warm-pool claim now rebinds the provider's own crew next to client.rekey, so
session_agent reports the claiming crew instead of the pool's agent spec, as a
cold start does (Opus 5.5 Review).

Co-authored-by: Ashish Patil <7754022+ash663@users.noreply.github.com>
@iamwhatever

Copy link
Copy Markdown
Contributor

Fixed the two CI reds on 781fdcf00 in 6435bfb20, folded into the top commit (still two commits). There is no behaviour change.

  • File line cap. ChatInput.tsx (2,009) and SessionRow.tsx (2,001) are back to 2,000 or fewer. Only this PR's own added lines changed: its new comments are condensed and its three new destructured props share one line. check_file_line_cap.py passes.
  • Hindi register. Three of this PR's components.chatInput.gateway_tools_* strings used the formal करें. They now use करो / जोड़ो, per style/hi.md §4. CI showed only gateway_tools_failed, but gateway_tools_not_sent and gateway_tools_no_tools failed the same check. With I18N_BASE_REF=origin/main, all 12 locale style suites pass.

Also passing locally: tsc, eslint on both files, the touched vitest files (102 tests), vitest related on both files (9,776 tests) and i18n:check.

@iamwhatever

Copy link
Copy Markdown
Contributor

@ash663 status check from the stale-PR sweep. This branch now conflicts with main in 17 files. One overlap needs your call: main shipped #33404 on 11-09, which marks the composer model chip with the session's harness through a harnessBackend prop. This PR draws the same fact through sessionBackend / served_backend, so the two need reconciling rather than both kept. Separately, the Opus 5.5 review on 6435bfb has an unanswered blocking finding: the new session facts (served_model, served_effort, served_backend, served_agent) outlive an unclaimed prefetch session and outrank the user's next pick. Its suggested fix is to stamp them with the provider's session_id and drop them on mismatch, the way _drop_orphaned_mcp_report does. The Internal Content Scan and Security Scope reds on that head were infra (the scan never completed). We have not pushed over your branch.

@ash663

ash663 commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

@iamwhatever Thanks for the status check, and for the two rebases you did for us. Before we put in another round, could you tell us if you'd like this PR?

If yes, we're glad to rebase it. We'll drop our harness mark and use #33404's harnessBackend instead, and fix the open Opus and UX blockers. First, though, we'd like to share how the process has gone from our side, because it has been hard to make progress:

  • Keeping it mergeable. Since 10-05 it has been rebased or ported five times and hit merge conflict six times. The conflict usually came back within two days, once within 90 minutes.
  • The green window. It reached readiness: passed once, on 10-20. It didn't get a maintainer review before main moved and put it back in conflict, about 30 hours later.
  • Unrelated reds. Many failures weren't from this diff: infra failures in Internal Content Scan and Security Scope, and tests the PR doesn't touch (test_decisions_end_to_end, test_project_scan_members on 11-04). We still end up chasing each one.
  • Upkeep. Each review round on a new head has raised new blockers. Keeping the PR alive has meant a rebase-and-fix cycle every few days, mostly for reasons outside the change.
  • AI token cost. Every round means AI agents rebasing and re-fixing on our side, and your AI review lanes re-reading 1,650 lines on yours. Most of those rounds came from churn on main, not the change itself. That gets expensive, and we don't think it's a sustainable use of AI tokens for either of us.

After 40 days it still has no human review. We'd love to find a way that works better for outside contributors, and costs less on both sides.

If you'd like it, these would help a lot:

  1. One named maintainer who can review it within a day or two of it going green.
  2. Sign-off on the UI shape before we rework it, so the next round doesn't reopen it.
  3. Main and infra reds rerun or overridden on your side, so they don't land on the PR.

If it's not something you want, no problem at all. Just let us know and close it. That's better for everyone than a sixth rebase.

@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: Request changes

Why: the decider found 3 problems and estimates an 88% chance that this change introduces a defect, at or above the 80% level where it asks for changes.

The PR makes the composer show the backend, model, effort and crew a session actually runs. On this head it breaks existing backend tests that I traced to the change itself. The new _footer_model local breaks the turn-plumbing closure rule (test_chat_runner_turn_plumbing fails). The new slot-projection fields change the slots frame without regenerating the turn goldens, so three golden scenarios and the counters test fail. Separately, the new display-only facts have no session-identity check, yet the composer now ranks them above the user's pick, so stale values can outlive their session. Requesting changes.

Problems found:

  • The new _footer_model turn local breaks the repository's turn-plumbing rule: a name a closure writes must not be held under its own name. The existing structural test catches this and fails on this head. (src/kiro_crew/dashboard/chat_turn/stop_recovery.py, medium)
  • The PR changes the slots frame, which is pinned by golden tests, without regenerating the goldens. test_turn_golden.py says such a change must commit the rewritten files from scripts/update_turn_golden_snapshots.py. Backend Tests shard 3 is red as a result. (src/kiro_crew/dashboard/slot_projection.py, medium)
  • The Opus lane found this and it is plausible on the code. The new facts can outlive their session, and the composer now ranks them above the user's selection, so the chip can name a dead session's model and effort. On main, served_model was only consulted under auto. A session-id check, like _dro (src/kiro_crew/dashboard/state_parts/slot_session.py`, medium)

An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit 6435bfb20d · 1748 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

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

fork Pull request from a fork (external contributor) merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: action required A blocking check or review needs attention

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants