Repository navigation
feat: show a stale-config badge on a chat running outdated config - #14810
billygerhard wants to merge 1 commit into
Conversation
UX Review (Opus 5.5, fork) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing the header Reload button's in-flight state. No screenshot shows the spinning arrow that is supposed to set a working press apart from a button blocked by a running turn. Evidence gaps
Notes
[UX-REVIEWED] a7fe162 Description read[DESCRIPTION-READ] 49f96e0dcd3a8d25d387128164c1510676cc6beec7c60898eb953e63fd640e8c That sha256 names everything this verdict read: the PR description, plus the 16 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 |
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. The badge is additive and fails toward "unknown", and every failure in the change detector is caught and dropped. Notes
[DESIGN-REVIEWED] a7fe162 Description read[DESCRIPTION-READ] 52a08f1d4b1ebce273199abd7a0624c88a62557e8b07f180938236766a6c58d1 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 |
First Principles Review (Opus 5.5, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks: the badge removes a real, silent failure, and no existing mechanism detects a stale config. Three riders add surface the Goal does not need. Notes
What this change shipsInventory (8 items) — 5 justifiedIntent: let a person see that a running chat needs Reload to pick up an MCP, agent-spec or
[FIRST-PRINCIPLES-REVIEWED] a7fe162 Description read[DESCRIPTION-READ] 15bcc91f10293fb3ef271730d9bc4f5cfb2789570a677ba93b9f8abd5ac34b97 That sha256 names the PR description this verdict read. Recompute it with |
GPT 6.1 Review (fork) — 🔴 changes requested (blocking)Reviewed 1 of 1 blocking finding(s) are security-class and were withheld from adjudication, so the blocking verdict stands. BLOCKING -- src/kiro_crew/dashboard/stale_config.py:1555 -- KAS reinjection leaves refreshed worker chats marked stale
[BLOCK-MERGE] a7fe162 Adjudication (Opus 5.5) — is blocking on each finding proportionate?LOW harm, not the unbounded harm the fence assumes. The worst outcome is a false "Config changed · Reload" badge that the operator clears with a Reload. The trigger is ordinary, though, so the strict-rarity bar for FLAG is not met. Conditions I confirmed:
[ADJUDICATION] a7fe162 total=0 uphold=0 downgrade=0 [ADJUDICATION-FENCED] a7fe162 fenced=1 flagged=0 |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
a3f0c66 to
9fd1eff
Compare
Record the product-shape decision behind kirodotdev#14810: a chat whose spawn-time config changed reloads its agent process at the start of its next turn, keeping the conversation, only when idle with no sub-agents attached; otherwise the reload waits and the Reload row shows it. Refs kirodotdev#10211.
Record the product-shape decision behind kirodotdev#14810: a chat whose spawn-time config changed reloads its agent process at the start of its next turn, keeping the conversation, only when idle with no sub-agents attached; otherwise the reload waits and the Reload row shows it. Refs kirodotdev#10211.
Record the product-shape decision behind kirodotdev#14810: a chat whose spawn-time config changed reloads its agent process at the start of its next turn, keeping the conversation, only when idle with no sub-agents attached; otherwise the reload waits and the Reload row shows it. Refs kirodotdev#10211.
Record the product-shape decision behind kirodotdev#14810: a chat whose spawn-time config changed reloads its agent process at the start of its next turn, keeping the conversation, only when idle with no sub-agents attached; otherwise the reload waits and the Reload row shows it. Refs kirodotdev#10211.
Record the product-shape decision behind kirodotdev#14810: a chat whose spawn-time config changed reloads its agent process at the start of its next turn, keeping the conversation, only when idle with no sub-agents attached; otherwise the reload waits and the Reload row shows it. Refs kirodotdev#10211.
Record the product-shape decision behind kirodotdev#14810: a chat whose spawn-time config changed reloads its agent process at the start of its next turn, keeping the conversation, only when idle with no sub-agents attached; otherwise the reload waits and the Reload row shows it. Refs kirodotdev#10211.
Record the product-shape decision behind kirodotdev#14810: a chat whose spawn-time config changed reloads its agent process at the start of its next turn, keeping the conversation, only when idle with no sub-agents attached; otherwise the reload waits and the Reload row shows it. Refs kirodotdev#10211.
Record the product-shape decision behind kirodotdev#14810: a chat whose spawn-time config changed reloads its agent process at the start of its next turn, keeping the conversation, only when idle with no sub-agents attached; otherwise the reload waits and the Reload row shows it. Refs kirodotdev#10211.
Record the product-shape decision behind kirodotdev#14810: a chat whose spawn-time config changed reloads its agent process at the start of its next turn, keeping the conversation, only when idle with no sub-agents attached; otherwise the reload waits and the Reload row shows it. Refs kirodotdev#10211.
9fd1eff to
bb5d57d
Compare
|
Disposition of the review findings on First Principles
UX
Design: the description now matches the diff (see item 8). GPT advisories: the function-local Opus advisory: the global Backend Tests (Windows) (2): the one failure was |
|
Pushed f9cc62b for the two upheld GPT findings on cc241df.
Each fix was mutation-probed (6 tests fail with the fixes reverted). Gate scripts, main's ratchet test, 2,352 tests, lint and mypy green locally. Description updated for the KAS rule. |
|
Pushed d8f66c5 for the two blocks on f9cc62b. Both follow from the crewmate work that landed on main today (#23010): KAS gained a third spec scope and a new kind of session, and the badge had not followed.
Each fix mutation-probed (5 tests fail with them reverted, plus the signature case). Gate scripts, main's ratchet test, 1,039 tests, lint and mypy green locally. Description updated for the KAS scope order. |
|
Rebased onto current main (53f1778): one import-list collision in |
|
Pushed a3d1a79 for the two upheld findings on 53f1778, plus a rebase onto current main (one pin-file collision, pins re-taken from the test).
Both mutation-probed (5 tests fail with the fixes reverted). Gate scripts, main's ratchet test, 443 stale-config and pin tests, lint and mypy green locally. |
|
Pushed 75e8814 for the one upheld GPT finding on a3d1a79: the crewmate-folder label I added last round called F2 (user-spec MCP fields during a workspace-scope outage) and F3 (turn-boundary ref capture, third time) were downgraded as disproportionate; not acting. Gate scripts, main's ratchet test, 500 stale-config and pin tests, lint and mypy green locally. |
|
Rebased onto current main (28ab101). Main's #23656 moved several chat-turn helpers out of |
|
Pushed 97362a9 for the upheld GPT finding on 28ab101 ( Fix, in the shape the adjudication named: |
|
Pushed 78aa17a for the upheld GPT finding on 97362a9 ( The badge has one render site, whose The Linux shard 3 red on the previous head was |
|
Pushed ace6f48 for the upheld GPT finding on 78aa17a, plus my own type slip from the previous head.
Rebased onto current main (17 commits, no conflicts). Gate scripts, main's ratchet test, 659 pin and stale-config tests, lint, mypy, tsc, eslint green locally. UX, Design, First Principles and Opus had passed. |
|
Pushed bd361ae for the Opus block and the frontend shard on ace6f48, plus a rebase (one pin-file collision; 312 rows re-taken from the test).
Gate scripts, main's ratchet test, 661 pin and stale-config tests, lint, mypy, typecheck green locally. GPT's remaining findings were all downgraded; UX, Design and First Principles passed. |
|
Pushed c592dd2 for the two blocks on bd361ae, plus a rebase (main added two provider methods beside this PR's
Both mutation-probed. Gate scripts, main's ratchet test, 739 pin, facade and stale-config tests, lint, mypy green locally. GPT's other findings were downgraded; UX, Design and First Principles passed. |
|
Pushed f7d1729 for GPT's upheld F2 on c592dd2.
Gate scripts, main's ratchet test, 739 pin, facade and stale-config tests, lint, mypy green locally. Opus, UX, Design and First Principles passed on c592dd2. |
|
Pushed 5373231: rebase after #19135 added |
|
Pushed e32f0f1 for GPT's upheld finding on 5373231. The refresh-generation fence added two rounds ago returned before the turn-end fold, so a turn-end check overtaken by a config write's refresh dropped the refs the turn had mounted; with the ref then removed from the spec, nothing later could learn it and the badge stayed "current". Gate scripts, main's ratchet test, 514 stale-config/contract tests, lint, mypy green locally. Opus, UX, Design and First Principles passed 5373231. |
|
Pushed 0414a90 for the two blocks on e32f0f1.
All three fixes mutation-probed. Gate scripts, main's ratchet test, 2030 contract/provider/session-control/stale-config tests, lint, mypy green locally. UX, Design and First Principles passed e32f0f1. |
|
Pushed d195b13 for the two blocks on 0414a90, both against last round's re-injection re-baseline.
All three halves mutation-probed (whole-projection adoption, turn-end-read baseline, no receipt each fail their pin). Shard 2 red = |
|
Pushed ab5c908, test-only: |
|
Pushed 321a1f0: rebase onto current main (+210). One conflict in |
|
Pushed 846bfce for GPT's upheld F2 on 321a1f0.
Gate scripts, main's ratchet test, 681 stale-config/contract/bindings tests, lint, mypy green locally. Opus, UX, Design and First Principles passed 321a1f0. |
|
Pushed 7bc3739 for GPT's upheld finding on 846bfce. On a hot-reloading provider the turn-end fold took the refs from the disk as the turn ended, so a ref added before a turn and removed during it (server kept) was never recorded and the badge stayed "current" with the tool still mounted. The admission receipt already taken for a pending re-injection now also covers this: Gate scripts, main's ratchet test, 1892 tests, lint, mypy green locally. Opus, UX, Design and First Principles passed 846bfce. |
|
Pushed 6d018ba: rebase after main added |
|
Pushed 04f9bdb for GPT's upheld finding on 6d018ba. The turn-end refresh read the turn receipt off the record while it ran; a queued successor turn admitted during the refresh's file reads overwrote that receipt with its own ref-free one, which the refresh then consumed and cleared, losing the mounted Security Scope Review red on 6d018ba was its generate job not finishing (infra); it re-runs with this push. Gate scripts, main's ratchet test, 1894 tests, lint, mypy green locally. Opus, UX, Design and First Principles passed 6d018ba. |
|
Rebased onto current main (+282) to clear a merge conflict; pushed
No badge code changed. Gate scripts, lint, mypy, 2,359 targeted backend tests, |
A chat's agent process reads its agent spec, mcp.json files and ACP backend once, at spawn, so an edit made after the session started never reaches it, and nothing told the person a Reload was owed. Record a field-level fingerprint of those inputs against the provider a chat runs on (at the turn, the prewarm, and the warm-pool spawn) and compare it at each turn's end, right after the gateway's own config writes, and on a stat-guarded 60s sweep for edits made outside it, so idle chats are badged too. A chat whose process runs on changed config gets a "Config changed · Reload" button right after its title that reloads the session in one click (disabled while a turn or sub-agents run); on a phone the title trigger carries that cue and opens the menu with Reload in it. Its sidebar row gets an alert mark; both tooltips name the changed file, and the session menu's Reload row says a press applies it. The signal clears on a Reload or when the config returns to its spawned state. Nothing is relaunched automatically. Detection follows the file each backend loads (kiro-cli reads JSON specs only; KAS the user-level directory), reads whole files up to the 50 MB cap, treats an unreadable input or unlistable agents directory as unknown, and does not flag an MCP edit a hot-reloading kiro-cli applied live. Agents read the same answer through a read-only session_config_status session-control tool.
|
Pushed
|
Problem / Motivation
Goal: Show when a chat runs on outdated config, so the person knows a Reload of that session is needed to pick up an MCP server, agent spec or
mcp.jsonchange.A chat's agent process reads its agent spec (including each
mcpServersentry and the env it hands its server), themcp.jsonfiles and the ACP backend once, when it is spawned. Enabling or editing an MCP server, or fixing an agent spec, after a chat started never reaches that chat. The remedy exists and keeps the conversation: Reload session in the session menu. Nothing tells the person it is owed, so they conclude the new server is broken, or start a new chat and lose the thread.Why it matters
The failure is silent: the setting shows as enabled and the chat simply cannot see it. It hits anyone who configures tools mid-conversation, which is the normal way people add an MCP server. A visible "Config changed · Reload" button turns that silent failure into a one-click Reload, without the dashboard relaunching anything on its own.
Not a goal
/api/mcp/,/api/agent/config) already reset every session (handlers/sessions.py:_reset_all_sessions); the badge covers the edits those resets never see -- a spec ormcp.jsonchanged in an editor, by an agent, or through the other config routes -- and a person still presses Reload.What changed (motivation → approach → change)
Goal → approach: record what a chat's process was spawned with, compare it cheaply against what the same spawn would read now, and show the difference on every stale chat, idle ones included. The comparison runs in the background at each turn's end, right after any of the gateway's own config writes, on a stat-guarded sweep every 60 s for edits made outside the gateway, and on an agent's request; no config writer has to know which chats it affects.
src/kiro_crew/dashboard/stale_config.py, new). Built from FIELDS, each file screened by the credential gate (hooks.validate_file_path) and then read whole through a component-wise pin of its directory (up to the spec resolver's 8 MBagent.PINNED_SPEC_DIR_MAX_TOTAL_BYTESbudget), so a link or junction swapped in at any parent folder after the check is refused rather than followed, in two halves:reconcilable: themcpServersentries (withdisabled/disabledTools) of the loaded spec and of the global and workspacemcp.json, plus@serverrefs ADDED totools. On a hot-reloading provider the refs a completed turn ran with are folded into the record at the turn's end (adopt_live_refs), read from the receipt its admission took (take_turn_receipts, one file read on such a turn; detached synchronously when the turn ends so a queued successor's admission cannot overwrite it under the refresh) rather than from the disk as the turn ends: the reconcile mounts an added ref at the turn boundary but never unmounts one whose server keeps running, so a ref added, used by a turn and then removed, during that turn or later, reads stale rather than current. The one removal that is not stale there is a ref removed together with its server's switch-off (the dashboard's toggle writes both): the reconcile stops that server, so the fingerprint carries the set of servers declared and enabled in the spec and in eachmcp.jsonthe spec mounts (live_server_refs; an excludedmcp.jsoncontributes only the Kiro Crew servers Crew mounts itself) and a removed ref whose server is outside it needs no Reload; each ref is looked up through the server it names (ref_servers), so a@server/toolref is judged like a whole-server one. Stale only on a provider that does not apply MCP edits live (mcp_hot_reload.provider_hot_reloads). A Kiro Crew server's entry in eithermcp.jsonis the exception: Crew reads it at each session start to decide whether to mount the session's identity element, so a change to it is stale on every provider. Themcp.jsonfiles are parsed as the session's own reader parses them (JSONC: comments and trailing commas), so a comment-only edit reads as unchanged; they are compared whole only when the spec mounts their servers (includeMcpJsonas the backend reads it: absent is true on kiro-cli and false on KAS, and an array-backed backend never mounts them); otherwise only each server'sdisabled/disabledToolsand the Kiro Crew identity-bound entries Crew reads at every spawn are compared. TogglingincludeMcpJsonis a spawn-only spec change.apply_pending_mcp_reinjection) keeps its provider but runs on the spec and MCP set that load read. The admission of the turn that applies it (mcp_reinjection_pending) takes that config as a receipt on the record; when the provider'smcp_projection_generationhas moved, the next check re-records its baseline from the receipt's spec and MCP parts (adopt_reprojection), keeping the spawn'sbackend,backend_keyandderived_from, which a re-injection does not re-read. An edit made during that turn, a pending backend change and a default-spec edit still read stale. With no receipt, or while the re-injection is pending or failed, the spawn's baseline stands.spawn_only: every other spec field (prompt,hooks,resources, all ofallowedTools, non-@servertools, a REMOVED@serverref, ...) and the ACP backend; for a derived agent (kirocrew-worker,kirocrew-heartbeat) also the default spec's surface it is re-derived from at spawn (agent.derived_surface_fingerprint, the spawn's own freshness comparison, minusmodel, which is applied through its own path or kept out by a user pin and never by a Reload), since an edit tokirocrew.jsona Reload would apply leaves the derived file on disk unchanged. Stale on every provider. A field the chat's backend never receives is left out, read from that backend's declared agent-config rulings (agent_sdk.backend_mcp_ability): a concern its mirror rulesno-channeland Crew does not carry itself (SessionCapabilities.crew_fires_spec_hooks). Today that ishookson claude and codex, so editinghooksthere does not badge; on kiro-cli, KAS, goose and opencode it still does.modelfield and the MCP gateway stub set are not inputs.stale_config.WINDOWS_SCAN_DISABLED: the fingerprint, the sweep's stat signature and the status check return before touching the filesystem), because resolving an agent-writable config path by name there can be redirected to a network share and trigger an outbound SMB authentication that leaks the Windows login. The badge works as described on macOS and Linux..kiro/agentsfolder unreadable no longer hides edits to the user-level spec: the two folders are tracked separately, so only the unreadable one is unknown and a chat running on the user-level spec is still badged when it changes. Config files are read within the spec resolver's 8 MB budget, so a planted oversizedmcp.jsonreads as unknown instead of costing a large parse on every re-check._agent_spec_files): kiro-cli reads*.jsononly (checkout.kiro/agentsfirst, then~/.kiro/agents), so a markdown spec is never its file; KAS reads~/.kiro/agentsfirst, either form, a.jsontwin beating the.md, then the crewmate folder (~/.kiro/mates/agents, and first for the mate conductor and worker), and falls back to the checkout's spec for a name neither declares, reduced to the keys it honours there (acp/harness/kas.resolve_projected_spec;agent_sdk.agent_specs.kas_project_spec_view), so a project-only agent's prompt edit badges and an edit to a checkout key KAS ignores does not; every other backend uses the specacp/session_mcpreads for it, composed as that mirrored session consumes it: with same-named checkout and user specs the session runs on the USER spec with only the checkout spec's switch-off keys layered on (the checkout is not trusted to choose MCP servers), so the fingerprint digests that composed document through the same twosession_mcphelpers (_mirrored_document), and a checkout-only server edit is not stale there while a user-spec argument edit is. The spec is resolved and read only through a pinned handle on each agents directory (agent.pinned_agent_spec_path,json_only=Truefor kiro-cli), never by the screened name again; each directory is pinned one path component at a time from the filesystem root, so a link swapped in at any parent folder after the check is refused rather than followed; a directory that cannot be pinned, that lists more thanPINNED_SPEC_DIR_MAX_ENTRIES(4096) entries, or whose specs sum pastPINNED_SPEC_DIR_MAX_TOTAL_BYTES(8 MiB, the aggregate read budget, since a declared name means every listed spec is parsed) reads as unknown, so the old fingerprint is carried forward and the chat is never badged on it.src/kiro_crew/dashboard/config_staleness.py, new;chat_runner.py). A turn whose live provider has no record yet fingerprints off the loop before it acquires the provider (a provider replaced during the acquire is fingerprinted once acquired) and records it against that provider (weakly keyed, first record per provider). A prewarmed provider is recorded by the eager spawn, from a fingerprint taken before its handshake; when the managed default spec is missing it takes none and leaves the heal to the spawn (regenerating it rebuilds every managed spec and re-reads the config dozens of times, where the eager path loads it once), and the first turn fingerprints the healed spec. A warm-pool process is fingerprinted before it starts (SessionManager.spawn_config_reader, wired by the gateway) and the claiming chat records that one. A process no turn started -- a hard stop's eager respawn or a reset's successor -- is fingerprinted before it starts (SessionManager.respawn_config_reader, wired by the gateway, for the spawn inputs the chat's previous process was recorded under) and carries it on the new provider only when the successor is started as the agent that record names (a hard stop's eager respawn asks for no agent and runs the default one, so a chat on another agent carries nothing and its next turn records the process it actually gets); the chat adopts it as that process's record. That pre-start read is bounded (RESPAWN_CONFIG_TIMEOUT_S, 2 s): a config directory that stalls delays no respawn, the successor starts without a receipt and reads as unknown until its next turn. A live process no record describes reads as unknown (stalenull; the tool says the check could not run), never as current, and the badge stays off. Spawn-side fingerprints first run the spawn's own pre-start steps in its order —ensure_agent_materialized, then therequire_fresh_derived_specfreshness gate — so a deleted managed spec the spawn regenerates, or a worker mirror it re-derives, is recorded as the spawn will read it; a gate refusal, which refuses the spawn too, records no fingerprint.config_staleness.py). A middleware schedules a refresh of every live chat after a successful write through the agent, capability and MCP routes (/api/agents*,/api/agent/config,/api/capability/*,/api/mcp/*; the/api/mcp-gateway/*writes touch onlymcp_gateway.*config or an in-process resolve cache, which no fingerprint reads, and the/api/agent-ask/*writes open or answer an agent's question card), off the request path and coalesced so a burst costs at most one extra pass; a test enumerates the registered non-GET agent, capability and MCP routes and pins each to a prefix. A change to the ACP backend inconfig.jsonarrives through the processConfigWatch(subscribe_backend_changes, onagent.acp_backend/agent.member_acp_backend), soconfig.jsonkeeps its single watcher.config_stale_sweep_loopticks everyCONFIG_STALE_SWEEP_SECS(60 s) for hand edits: it takes a stat-only signature of each live chat's inputs (stale_config.input_signature:lstat(mtime, size and ctime, so a permission change counts) of both agents directories plus their spec listings, so a newly added spec counts, and bothmcp.jsonfiles; nothing is opened) and re-fingerprints a chat only when that signature changed since its last check. A reading left unknown by an unreadable input records the signature too, so it is not re-fingerprinted every tick. Work runs off the loop, at most four chats at once; a chat mid-turn (its turn's end covers it) is skipped, and one with no live, recorded process (an idle session that expired) has its badge cleared. The write-refresh middleware sits in each chain's orderedapp.middlewares[:] = [...]list (dashboard/server_runtime/middleware_chain.py, handed in by both entrypoints), so that assignment cannot drop it; the sweep, its ConfigWatch subscription and the warm-pool reader are wired from theconfig_watchowner. The spawn record keeps a sha256 digest per input part, not the field text.refresh_config_stalepublishesconfig_staleandconfig_stale_inputs(display-safe labels: project-relative or~paths, each passed through the outbound credential/URL sanitizer, so an agent-planted spec whose file name carries a credential-shaped string is redacted on the slot, in broadcasts and in thesession_config_statusanswer, for both thechangedand theunreadablelists) on the slot projection, broadcasting only on a change; an unknown reading leaves the badge as it was. The Reload action clears it, and it clears on its own when the config returns to the spawned state. The frontend shows ONE call to act in the chat header, placed per width so the phone bar keeps its two controls (max-two-buttons-per-row). On the desktop title row it is a warn-toned Config changed · Reload button (StaleConfigReloadButton) right after the session title: one click calls the sameuseSessionActions().reload(slotKey)the menu row calls, and it is disabled while a turn or sub-agents run, through a hook it shares with that row; while its own reload is in flight it isaria-busyand the arrow turns (in both forms), so a button working on the press reads apart from one blocked by a running turn (hooks/useReloadBlocked.ts). While a chat is stale the title's hover Rename and Auto-title buttons are not shown (SessionTitleControlhoverActions; both stay in the session menu, which lists Auto-title on the desktop only then), so the row holds two controls: the session menu and Reload. A header reload the gateway refuses (a turn started first, or sub-agents still working) is reported through the chat's action-error notice above the composer (with the agent hand-off), not an alert and not a notice of its own in the header row; the button stays enabled for a retry and a double press sends one request. The inline Reload is hidden, not unmounted, while an Auto-title Undo is offered (Undo is a control the row cannot hide), and Reload stays in the session menu meanwhile; a reload already in flight still reports its failure to the header's notice. The button is keyed by chat, so moving to another stale chat mid-reload gives that chat its own enabled button and the first chat's late result reports nowhere. On the phone bar it is a non-interactive cue inside the existing title/menu trigger (StaleConfigCue): an alert glyph and Config · Reload before the title, the glyph's accessible label carrying the full tooltip, so a tap on the title opens the session menu whose Reload session row applies the change; the bar adds no control of its own. Its tooltip names the changed file ("… changed since this session started. Reload the session to apply."). The sidebar row carries a warn-colored alert mark (CircleAlert, not a refresh arrow) directly after the agent name, with the same tooltip. The session menu's Reload session row stays as a second path and says "config changed · reload to apply", or, while Reload is blocked, "config changed — reload when the turn ends" / "… when sub-agents finish". When changed files are named, only that list truncates to fit the menu; the remedy after it always shows in full, and hovering shows the whole sentence. On a phone (belowmd) the note drops onto its own line under the Reload label and the remedy wraps, and every menu that renders the session actions is capped to the viewport width (max-w-[calc(100vw-1rem)]), so the row fits at 320px in every locale. The condition is named "Config changed" on every surface, in every catalog.session_config_statussession-control tool (GET /api/session-control/config-status, strict-internal), authorized assession_summaryis except that the caller's own chat is a valid target (the usual case: checking that your own MCP edit reached you), and re-checked after the config read. It returnsstale(true / false / null), what changed and what could not be read, refreshes the same badge, and never reloads. Its in-repo consumer is thedebug-gatewaybuiltin skill (src/kiro_crew/builtin_skills/debug-gateway/SKILL.md, "Ask before you conclude", step 4): an agent that has just added or changed an MCP server or agent spec for a chat calls it before concluding the change did not land, and tells the user to press Reload when the chat has a stale config. Without it, that agent sees the new server missing and tells the user the server is broken. It is oneidentity="strict"row ofmcp_dashboard.TABLEbesidesession_summary, so the table's session-control gate,SESSION_CONTROL_TOOLSand the channel-agent block all cover it. Blocked for channel agents with the other cross-session reads. The dashboard MCP server now has 32 tools.docs/system-specs/modules/session.md(Stale-config detection),src/kiro_crew/docs/agent-spec-fields.md(which field makes a chat stale),src/kiro_crew/docs/session-control.md,docs/system-specs/modules/session-control.md(tool/route table), the feature map.Backwards compatibility
Compatible: one read-only route and tool and two slot-projection fields are added; no existing route, payload field or behavior changes, and this change relaunches nothing.
Tests
test/test_stale_config.py:mcp.jsonnested past the JSON parser's depth read like a syntax error and an unlistable agents directory; a same-named user spec added or removed while the workspace spec is loaded is not stale (the shadowed path is in no digest), and a workspace-spec chat stale for anmcp.jsonedit names only that input when a user spec also appears; a loaded spec that loses read permission is unknown and carried forward, not absent; a symlinked, hardlinked or directory spec-named entry for another agent beside the spec (user or workspace scope) is skipped, so a later edit of the real spec still marks the chat stale and the input is not unknown;hooksedit does not badge a codex or claude chat (apromptedit on the same backend still does) and does badge kiro-cli, goose and opencode;is_staleby half and provider (a hot-reloaded MCP edit is not stale; a spawn-only edit is);session_config_status: the verb, the caller reading its own chat, its refusals (mirrored target, session control off, a fenced caller reaching a peer it did not create), the route's refusal mapping and strict-internal registration, the tool's replies (a check that names no file says to try again rather than blaming a config file) and its channel block;stale_config.WINDOWS_SCAN_DISABLED): the fingerprint, the stat signature and the status check touch no filesystem helper, the signature is constant, the status is unknown without recomputing, and two such fingerprints never compare stale. Each test fails with the short-circuit removed.changedlist after it is planted, and in theunreadablelist when it cannot be read;finally; the permission-signature test injects distinctst_ctime_nsvalues throughPinnedDirectory.lstatinstead of waiting on the filesystem clock;website/src/components/StaleConfigBadge.test.tsx: the sidebar mark is the alert glyph (no refresh arrow) with the plain tooltip and generic fallback; the header button reloads its slot in one click, is disabled while a turn runs and while sub-agents are attached, carries noorder-class at any breakpoint (only the "Config changed" words hide belowsm), renders nothing once current, and is not inside the session-menu trigger.website/src/test/ChatPage.mobileSingleTopbar.test.tsxandChatPage.mobileTopBarActions.test.tsx: on the phone bar the title trigger contains the cue (glyph + "Config · Reload", full tooltip as its label) only while stale, the bar renders no Reload button, and the cue is no button or focus target; on the desktop inline row the button follows the title group.website/src/components/SessionActionsMenu.cov80.test.tsx: the Reload row's stale note, alone and beside "sub-agents working", only the changed-input list truncates, the remedy clause stays whole in all three states, and the title is the full sentence; on a narrow screen the row wraps and the note stacks under the label (basis-full,md:restoring the desktop row) and the remedy wraps (whitespace-normal,md:whitespace-nowrap md:shrink-0).website/src/test/ChatHeaderMenu.slack.test.tsx: the header session menu is capped to the viewport width. The capture script fails if the menu or the remedy reaches past a 320px viewport, in English or Japanese.website/src/test/ChatSidebar.staleConfigBadge.test.tsx: the sidebar mark sits directly after the agent name, ahead of the memory-mode glyphs, and is the alert glyph with the plain tooltip. The capture script also fails if the header button is not right after the title, or if a click on it does not POST the session's reload..md+ user JSON, user.mdonly, a name-declared spec beside a filename match; plus workspace-only and three crewmate-folder layouts for KAS) assert the fingerprint watches the file the real loader picks (harness.kas.resolve_projected_spec,session_mcp._agent_spec_and_snapshot_for, kiro-cli's JSON discovery withmarkdown_spec_for_agent), so loader drift fails a test.includeMcpJsonparity: for absent,true,false,nulland a non-bool flag, the per-backend mount rule is pinned to its owner: KAS to whatkas_agents.to_client_custom_agentforwards, each array backend tosession_mcp.session_mcp_servers(which never hands over anmcp.jsonserver), and kiro-cli, whose rule lives in the kiro-cli binary, to theincludeMcpJsonreadingagent_capabilitiesapplies. A last test fails when a backend joins the registry without a pinned rule (pi has no in-repo owner; it is pinned as not mounting). Each was mutation-probed against thestale_configcopy._run_chatpath, through the fallback-attribution harness); a Reload or rebind landing while a check reads the config drops that answer instead of re-badging the fresh session; each agents directory's listing is streamed into a bounded signature: the lexicographically smallestSIGNATURE_MAX_SPEC_ENTRIES(256) names in a bounded heap, plus a fixed-size overflow marker (count and an order-independent XOR of per-entry sha256 over name and stat) that changes on any edit, add or removal past the cap; no list of all names is built. Gateway cleanup cancels and awaits the sweep task and cancels the ConfigWatch subscription (both entrypoints), and the built-app test asserts neither survivesrunner.cleanup().start_api_serverapp carries the write-refresh middleware and a config write through it schedules the refresh; both entrypoints list it inside their ordered middleware chain; a badged chat whose session expired is cleared; the record's per-input parts are 64-character digests (the@servertool refs too, capped atFINGERPRINT_MAX_TOOL_REFS(256) with one overflow entry) even for a 5 MB spec; the sweep is enumerated as aslot.runningreader intest_slot_running_readers.py.pool_spawn_configis declared onLLMProvider(default None, no receipt) and read directly; an input unreadable at spawn is adopted once and persisted, so a later edit to it is stale; an unlistable agents directory keeps the recorded spec selection (spec_path/spec_ws/user_spec_pathare carried forward) and reads unknown, not changed.getattragain, the adopted baseline not persisted, the selection metadata not carried forward, the write-triggered refresh disabled, firing on a failed write or on reads, or never running; the sweep's stat guard removed, its signature never stored, or the sweep running unguarded; the mid-turn skip removed; the spec-directory listing dropped from the signature; the user agents directory dropped from it; the middleware not installed; the badge set regardless of staleness, the hot-reload exemption removed (inis_staleand in the status), the verb skipping its gate, the tool dropping the refusal, the Reload action not clearing the badge, the frontend badge shown withoutconfig_stale, the menu note shown unconditionally; the tool-ref digest and its cap/overflow; the member-DM backend-key label; the aggregate spec-read budget (EFBIG); the component-wise pin reverted to one absolute open; the sidebar badge moved back behind the memory-mode glyphs; the remedy clause made truncating; themcp.jsonread put back to a by-name read after the gate;/api/mcp-gateway/put back in the refresh prefixes; theincludeMcpJsonreading per backend, the restriction view, and the effective-view picker; the spawn-fingerprint heal dropped; the Kiro Crew identity entry compared after the hot-reload shortcut; the sweep guard skipped on unknown readings and ctime dropped; the pre-acquire fingerprint taken unconditionally;/api/capability/dropped from the refresh prefixes; the spawn-fingerprint freshness gate dropped; the shadowed user spec's path hashed into the spawn-only digest; the backend-unconsumed-field filter removed; the pinned resolver skipping an unreadable spec instead of raising; the pinned resolver raising on a refused link or non-regular entry instead of skipping it; the shadowed user spec's path counted bychanged_inputs; the remedy clause put back toshrink-0 whitespace-nowrap; the Reload row's narrow wrap removed; the header menu's viewport cap removed;RecursionErrordropped from either spec-parse catch; the tool's no-file reply put back to blaming a config file; thesanitize_outboundcall dropped fromdisplay_input(all four redaction tests fail); the spawn fingerprint skipped in_take_spawn_fingerprint(the prewarm-cancel test fails in seconds, no hang); ctime dropped from the entry stat (the permission-signature test fails); the respawn's carry call dropped (eager respawn and reset successor each fail their case); the no-record answer put back tostale: false(both unknown-status tests fail); the eager spawn's missing-spec skip removed (both eager config-load tests fail with 29 loads, and the missing-spec prewarm test fails).Manual verification
Captured against the built SPA with the gateway stubbed (
website/scripts/capture-stale-config-badge.mjs), and checked visually. The detection itself is covered by the backend tests above, which run on real files.Screenshots / video
A chat on outdated config: the Config changed · Reload button right after the session title, and the alert mark on its sidebar row, directly after the agent name; the other chat shows neither.
The header button's tooltip naming the changed file and the remedy (headless Chromium paints no native tooltip, so the capture draws the button's own
titletext).The session menu, the second path: "config changed (…) · reload to apply" on the Reload session row: the changed-file list truncates, the remedy stays whole.
The same menu at a 320px phone width, in English and in Japanese (the longest rendering of the row): the menu fits the viewport, the note sits under the Reload label, the file list truncates and the remedy wraps onto the next line instead of being cut off.
More states (04–10, 13)
While a turn runs: the header button and the Reload session row are both greyed; the file list truncates and "— reload when the turn ends" stays whole.
The generic tooltip of a stale chat with no changed file named: "This session's config changed since it started. Reload the session to apply."
While sub-agents work: the header button and the Reload session row are both greyed; the file list truncates and "— reload when sub-agents finish" stays whole.
The sidebar alert mark's tooltip: names the changed file and says to reload the session.
The phone bar at 390px with a long session title: the title/menu trigger carries the alert glyph and Config · Reload before the title (which truncates), and the bar adds no button of its own; a tap opens the session menu with Reload session in it. The desktop row keeps the one-click button.
The session menu of a stale chat with no changed file named: the Reload session row's generic note, "config changed · reload to apply".
That chat's sidebar mark tooltip, generic wording: "This session's config changed since it started. Reload the session to apply."
A header reload the gateway refuses (sub-agents still working): the failure shows in the chat's action-error notice above the composer, with its agent hand-off; the header row gains no control, the button stays enabled for a retry, and no alert dialog opens.
Related Issues
Refs #10211 (this shows the stale state and points at Reload; it does not reload automatically).
Follow-ups opened from review: #23136 (phone accessible name), #23137 (Reload affected chats on Connections).
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement