Skip to content

fix(chat): skip the resume prefetch a tool-search replay would refuse - #16160

Merged
bolichen97 merged 1 commit into
mainfrom
fix/15725-skip-doomed-resume-prefetch
Oct 3, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/15725-skip-doomed-resume-prefetch

Conversation

@pepmach

@pepmach pepmach commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Focusing a reopened dashboard chat with Tool Search on starts no kiro-cli runtime that can only be killed again; the slot simply waits for its first turn, which starts exactly as it does today.

With agent.tool_search: true (the default), the kiro backend and session.eager_spawn on, focusing a reopened dashboard chat whose runtime is gone (after a gateway restart, or once the idle sweep retired it) runs the resume prefetch: _eager_spawn asks get_or_create(speculative=True, speculative_resume=True) for a speculative session/load. But on this path the provider never loads -- AcpProvider._start_kiro_runtime_impl replaces the native session/load of a direct dashboard session with a fresh session plus conversation replay -- so client.resumed is always False, and session_allocation raises SpeculativeResumeRefused after the runtime is fully up, hard-killing the process tree it just spawned. The gateway log at INFO for one reopened chat (from the issue):

Attempting session/load for dashboard:chat-<id> (sid=<sid>)
Tool Search is enabled; replacing native session/load for <sid> with a fresh session and conversation replay
AcpRuntime spawned backend= agent=kirocrew (PID 12479)
Created session <new sid> on runtime PID 12479
runtime kill pid=12479 caller=session_pid._sync_kill_provider reason=leaked provider teardown
Eager spawn: dashboard:chat-<id> left to first turn (refused)
_sync_kill_provider: killed PID 12479 for leaked provider (SIGTERM, scope=pgid, descendants=17)

About 6 s of startup and a 17-process tree per focus, saving nothing: the first real turn spawns its own runtime and starts its own fresh session anyway.

Why it matters

This is the default configuration, so every reopened dashboard chat pays it after every gateway restart. The doomed spawn also holds one of the host-derived prewarm admission slots and the eager-spawn concurrency semaphore for as long as it lives, so it can crowd out a prefetch that could have succeeded. And the kill is logged as leaked provider teardown, which sends an operator hunting for a leak that does not exist.

Not a goal

  • [bug] Tool Search resume silently delivers an empty context while claiming history was restored #16059 -- the conversation replay dropped by SLIM_RESUME on the same tool_search_replay branch (context.py). A separate defect; nothing in context.py is touched and this fix neither depends on nor assumes that one.
  • Changing what the first real turn does on this path. It keeps its fresh-session-plus-replay behaviour, the replay lease and its settlement contract unchanged.
  • Letting the prefetch keep a fresh replay-pending session for the first turn (the issue's alternative fix). Not taken: it would change the replay-lease settlement contract and the speculative_resume observation semantics.
  • Changing the refusal path for every other case -- a speculative load that fell back, a provider switch, a vanished mapping -- or Refused speculative session leaks the agent process tree (single-PID kill) #10245's process-group kill of a refused speculative session. Both stay as they are.
  • The generic leaked provider teardown kill reason of _sync_kill_provider for a refused speculative spawn. Unchanged; with this fix the refused spawn simply stops happening on this path.

What changed (motivation → approach → change)

Symptom: a reopened chat's focus spawns a full runtime and kills it. Root cause: _eager_spawn decides to prefetch from the in-memory resumable hint alone, while the provider decides -- later, with the runtime already up -- that this resume is a tool-search replay, which session_allocation can only refuse. Two sites, one decision, and the expensive one ran first.

Change, ONE predicate:

  • src/kiro_crew/agent_sdk/tool_search.py: the provider's inline condition (Tool Search on, backend == ACP_BACKEND_KIRO, no channel identity, telemetry_channel_of(session_key) == "dashboard") is extracted into the pure module-level function resume_takes_tool_search_replay(tool_search, backend, channel_id, session_key), hosted in the module that already resolves agent.tool_search* and documents what Tool Search does on both kiro engines -- below both callers, because the dashboard may not import the ACP layer (scripts/check_agent_sdk_boundary.py, see Review lanes). Its one messaging.link import is function-level: at module level it is an import cycle (kiro_crew.messaging → its driver → kiro_crew.acp → acp.runtime → this module), named in a comment and checked in fresh interpreters.
  • src/kiro_crew/providers/acp.py: _start_kiro_runtime_impl imports that function and calls it once a resume sid is in hand (if resume_sid and resume_takes_tool_search_replay(...)) and does exactly what it did before. Whether a resume is attempted at all (a persisted sid, persistent memory) stays the caller's precondition; the function answers only which shape the resume takes.
  • src/kiro_crew/dashboard/chat_runner.py: _eager_spawn asks the same function (imported from kiro_crew.agent_sdk.tool_search, so the file's ACP-layer import count stays at its baselined 3) before any runtime exists -- after the binding and memory-store "left to first turn" guards, before the default-model resolve, the selection write, admission and the spawn -- with tool_search=cfg.agent.tool_search, the backend select_provider_backend(session_key, cfg.agent.member_acp_backend, cfg.agent.acp_backend) resolves for this key (the factory's own selection, not a second copy of it), channel_id=None (the prefetch allocates with no channel identity) and the slot's effective session key. When it answers replay, the slot is left to its first turn under one INFO line in the existing style, Eager spawn: <key> left to first turn (tool-search replay), and nothing is spawned. Only the allow_resume (slot-focused) path is gated; fresh eager spawn from the create/project/agent signals is untouched.
  • Specs updated in the same commit: docs/system-specs/modules/providers.md (Native-resume compatibility names the predicate and the prefetch that reads it), docs/system-specs/modules/learn-cron-dashboard.md (the slot_focused resume-prefetch paragraph), docs/system-specs/modules/session.md (the get_or_create row's speculative_resume contract).

Not a product-shape change: the user-visible outcome is identical -- the first message on a reopened chat cold-starts a fresh session with the conversation replayed, as it does today. What disappears is the wasted spawn, its kill and the misleading log line. The resume prefetch's latency win was never available on this path (the load it would have overlapped is the one the provider replaces), so nothing that worked is lost; with Tool Search off, or on a non-kiro backend, or for a channel-linked slot, the speculative session/load runs exactly as before.

Backwards compatibility

Compatible: no config key, API, wire message or persisted format changes. resume_takes_tool_search_replay is a new module-level function in kiro_crew.agent_sdk.tool_search; the provider branch that used the inline condition evaluates the same condition through it. No caller passes anything new to get_or_create.

Tests

Red-first, -n0. test/test_eager_spawn.py::TestToolSearchReplayPrefetchGate was written before the fix and run against the unfixed code; the failing assertion:

FAILED test/test_eager_spawn.py::TestToolSearchReplayPrefetchGate::test_replayed_resume_spawns_nothing
E           AssertionError: Expected get_or_create to not have been awaited. Awaited 1 times.

(the two native-path cases of the class already passed, as they must: without the gate the load is attempted.) After the fix the class passes, and the whole module is green: 110 passed.

What the tests lock in:

  • test_replayed_resume_spawns_nothing: with the default config (Tool Search on, kiro backend) and a dashboard key, the slot-focused eager spawn awaits no get_or_create and logs exactly one left to first turn reason, Eager spawn: dashboard:t1 left to first turn (tool-search replay).
  • test_native_resume_still_prefetches[tool-search-off] and [non-kiro-backend] (table-driven): with agent.tool_search=False, or with agent.acp_backend=ACP_BACKEND_KAS, the speculative resume still reaches get_or_create(speculative_resume=True).
  • The four existing tests of the speculative LOAD itself (test_allow_resume_passes_speculative_resume, test_resumed_prefetch_arms_ttl, test_fresh_spawn_does_not_arm_ttl, test_failed_speculative_load_leaves_nothing_behind) move to a _native_resume_cfg() helper that turns Tool Search off, so they keep exercising the load path they describe instead of passing vacuously behind the new gate. Every other test in the module is unchanged.

Provider and session lane (-n0, each file named): test/test_acp_provider.py test/test_acp_tool_search_wire.py test/test_acp_backend_kas.py test/test_session.py test/metrics/test_startup_metric.py test/test_eager_spawn_start_backoff.py -- 586 passed, 5 skipped. The provider's tool-search replay branch and resume_outcome metric are pinned there and unchanged.

Gates from the worktree: python3 scripts/check_black_formatting.py, python3 scripts/check_subprocess_encoding.py, isort src/kiro_crew test, flake8 src/kiro_crew test, mypy src/kiro_crew (2053 source files, no issues), COMMENT_HISTORY_BASE_REF=<merge-base> python3 scripts/check_comment_history.py (passed: no history narration on added lines), HARNESS_BASE_REF=origin/main python3 scripts/check_harness_parity.py (Kiro identity tested positively on the added lines), bash scripts/docs-lint.sh (all documentation checks passed). black --target-version py310 ran only on the three touched files, none of which is in .github/black-baseline.txt.

scripts/local-gate.py (backend related set: 732 test files in 2 batches; host headroom 68-69 GB read before every lane, so no lane was skipped for memory):

  • batch 1/2 (655 files): 41,993 passed, 3 failed, 140 skipped. None of the 3 is attributable to this diff: test_auto_improvement_members.py::test_assignments_build_real_context_from_only_their_private_store (_ManagedEssentialSourceError: this host's scratch root sits under the data home) and test_model_served_default.py::TestClientInheritExits::test_withheld_pin_still_lands_on_a_served_model (a session/set_model expectation shaped by this host's own kiro state) fail identically on a pristine detached worktree of the base 6916ba17f0 with the same interpreter; test_issue_radar_crew_runtime.py::TestSession::test_wake_runs_a_turn_carrying_the_brief_and_the_nudge (CrewLedgerNotRecorded) is an order-dependent flake under xdist that passes alone and with its whole file (160 passed) under -n0, and imports nothing this diff changes.
  • batch 2/2 (66 files): 3,511 passed, 20 skipped, 0 failed.
  • Net: 45,504 related tests passed; no failure attributable to this diff.
  • One environmental note for whoever reruns this: a first local-gate pass on a venv built with pip install -e ".[dev]" -- which resolves the unpinned setup.cfg extra (pytest 9.1.1, pytest-asyncio 1.4.0) -- failed 52 test_acp_runtime.py KAS-readiness cases with TimeoutError (the runtime's reader loop lands on a different event loop). On the pinned dev group (pip install --group dev: pytest 9.0.3, pytest-asyncio 0.20.3), which is what CI runs, that file is 497/497 green here, in isolation and inside batch 1 above.

Frontend lane: not run here. The diff touches no website/** file; the 359 "related" frontend files are the cross-surface list plus stem matches on the changed paths, none referencing a changed file by name, and this fresh worktree has no node_modules. CI runs the frontend suite regardless.

Manual verification

N/A -- unit coverage sufficient: the gate is a pure predicate over the loaded config and the session key, pinned at both callers by the tests above, and the log reason is asserted verbatim. No live gateway was driven in this round.

Related Issues

Fixes #15725

Related: #2386 (resume prefetch), #9762 (the Tool Search fresh-session path), #10245 (process-group kill of a refused speculative session, unchanged), #16059 (the dropped replay on the same branch, out of scope here).

Pattern harvest

Rule candidate: review-prompt
Pattern: a speculative or prefetch path decides to start expensive work without reading the predicate the real path uses to decide the work's outcome, so it attempts something whose refusal is already decidable before the expensive step -- "the cheap path and the expensive path read ONE predicate, and the cheap one asks first" is checkable wherever a speculative= / prefetch call sits in front of a provider or allocator that can refuse.

Review lanes

Round 2 (head after 9c3c0f433632):

  • Own red, Backend Lint & Type Check (3.12), step "Check agent-SDK import boundary": scripts/check_agent_sdk_boundary.py refused the round-1 head with src/kiro_crew/dashboard/chat_runner.py: ACP-layer imports grew from 3 to 4. The baseline is shrink-only. -- the new from kiro_crew.providers.acp import resume_takes_tool_search_replay was a fourth kiro_crew.providers* import in a file .github/agent-sdk-boundary-baseline.txt pins at three, and the gate has no opt-out marker by design. Opus 5's one FINDING (chat_runner.py:345) is the same defect. Fixed by moving the predicate, not by raising the baseline: it now lives in src/kiro_crew/agent_sdk/tool_search.py, the module that already resolves agent.tool_search* and sits in the import surface the gate lets application code reach; providers/acp.py (which already imported that module) and chat_runner.py both import it from there, so there is still exactly one definition and chat_runner.py is back at three ACP-layer imports. Red first: the gate script fails on the round-1 tree with the line above and passes on this head. One consequence of the new home: a module-level import of messaging.link.telemetry_channel_of there is a cycle (kiro_crew.messaging imports its driver, which imports kiro_crew.acp, whose runtime imports agent_sdk.tool_search), proven in a fresh interpreter; that import is function-level with the cycle named in a comment, and import kiro_crew.agent_sdk.tool_search now succeeds first, after kiro_crew.messaging, after kiro_crew.acp.types and after kiro_crew.agent_sdk.backends.
  • Backend Tests (Windows) (4): test/test_prompt_override_encoding.py::TestUtf16OverrideDegradesToShippedPrompt::test_unreadable_override_still_degrades_to_shipped_prompt (up to 13 vs up to 14: two renders of a host-dependent sub-agent cap) is tests: prompt override degrade tests compare two renders of a host-dependent sub-agent cap (Windows main red) #16109; the file is untouched by this diff and the shard re-runs with this push.
  • GPT 5.6 Review on the round-1 head: lane fault, ci: GPT 5.6 Review fails closed when the model stream disconnects after 5 reconnects (2 sightings 10-02) #16166 (the model stream disconnected after five reconnects, no verdict written); re-run once, it completed with no findings on 9c3c0f433632.
  • Rebased onto 26ae7429b4 (main's tip; its five commits since 6916ba17f0 -- fix(crew-log): ignore a segment name whose number is not plain ascii #15961, test: touch the crew log off the event loop in every async test #16102, feat(decisions): add noul and score question types #16014, fix(decisions): keep a pinned decisions deny covering local models #16056, fix(decisions): resume the local model under the provider-switch lock #16090 -- touch no file of this diff). The diff is byte-identical to the pre-rebase candidate and the commit message is unchanged; the boundary, comment-history and push_guard gates and the named -n0 tests were re-run on the rebased tree.

Gates on this head: python3 scripts/check_agent_sdk_boundary.py passes (chat_runner.py back at three edges; the same script fails on the round-1 tree with the line quoted above); COMMENT_HISTORY_BASE_REF=origin/main python3 scripts/check_comment_history.py passed; push_guard.py --base main --require-single-on-base SAFE (single commit on 26ae7429b4); black ratchet, black --check on the three touched Python files (none baselined), isort and flake8 clean; python3 scripts/docs_lint.py all checks passed; mypy over the three touched modules (imports followed) no issues. Named -n0: test/test_eager_spawn.py 110 passed; test/test_acp_provider.py + test/test_providers_base_cov80.py 101 passed; test/test_acp_mandatory_mcps.py + test/test_acp_tool_search_wire.py + test/test_kas_spawn.py 108 passed, 5 skipped. scripts/local-gate.py backend related set (736 files): batch 1 (734 files) 41,950 passed, 140 skipped, 2 failed; batch 2 (2 files) 6 passed. The two are the same host-environment failures recorded for round 1 under Tests -- test_auto_improvement_members.py::test_assignments_build_real_context_from_only_their_private_store (_ManagedEssentialSourceError: this host's pytest scratch root sits under the data home) and test_model_served_default.py::TestClientInheritExits::test_withheld_pin_still_lands_on_a_served_model (a session/set_model expectation shaped by this host's served-model state) -- in files this diff does not touch; they reproduce alone on this head, reproduced identically on the base in round 1, and both passed in every Linux shard of the round-1 CI run. Frontend lane not run here (no website/** change, no node_modules in this worktree); CI runs it.

Round 3 (head after 94227347a771):

Gates on this head: python3 scripts/check_agent_sdk_boundary.py passes (chat_runner.py still at three ACP-layer edges); COMMENT_HISTORY_BASE_REF=origin/main python3 scripts/check_comment_history.py passed; push_guard.py --base main --require-single-on-base SAFE (single commit on af162847d6); black ratchet, isort and flake8 clean on the touched files; mypy over the three touched modules (imports followed) no issues; import kiro_crew.agent_sdk.tool_search still succeeds first, after kiro_crew.messaging.link, after kiro_crew.providers.acp and after kiro_crew.dashboard.chat_runner. Named -n0: test/test_eager_spawn.py 110 passed; test/test_acp_provider.py + test/test_providers_base_cov80.py + test/test_acp_tool_search_wire.py + test/test_kas_spawn.py + test/test_acp_tool_search_spawn_env.py (the file #16131 added in place of test_acp_mandatory_mcps.py) 243 passed, 5 skipped. scripts/local-gate.py backend related set (737 files): batch 1 (666 files) 43,278 passed, 140 skipped, 2 failed; batch 2 (71 files) 3,766 passed, 20 skipped. The two are the same host-environment failures recorded for rounds 1 and 2 (test_auto_improvement_members.py::test_assignments_build_real_context_from_only_their_private_store, test_model_served_default.py::TestClientInheritExits::test_withheld_pin_still_lands_on_a_served_model), in files this diff does not touch; they reproduce alone on this head and both passed in every Linux shard of the round-2 CI run. Frontend lane not run here (no website/** change); CI runs it.

Checklist

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

Contribution License Agreement

@pepmach
pepmach requested a review from a team as a code owner October 2, 2026 14:00
@pepmach
pepmach requested a review from bolichen97 October 2, 2026 14:00
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of 6e5c0e602cec7dc75a2ca44f1f2bb82f3794d01f — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Verify the claimed fresh-interpreter import-cycle check exists — this diff adds no test guarding the lazy messaging.link import against a future top-level move.

[DESIGN-REVIEWED] 6e5c0e6

Description read

[DESCRIPTION-READ] 5e2778805f617f36c8055645f7a6432a4b44c079cafaf688fdc36fc7bb00f5fc

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 2, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ PASS

Premise-level review of 6e5c0e602cec7dc75a2ca44f1f2bb82f3794d01f — 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/CONCERNS are advisory.

First-Principles-Verdict: PASS

Verify the premise that the slot-focus prefetch always allocates channel-less: a dashboard-keyed slot with an inbound Slack link would otherwise lose a prefetch that could have succeeded — a latency cost only.

What this change ships

Inventory (6 items) — 6 justified

Intent: FIX — stop the slot-focus resume prefetch from spawning a kiro-cli runtime the provider's tool-search replay guarantees will be refused and killed. Provenance: red-first test failing on base (quoted assertion), issue log quoted.

  1. Focusing a reopened dashboard chat (default config) no longer spawns and kills a runtime; the slot waits for its first turn — justified
  2. New INFO reason left to first turn (tool-search replay); the misleading leaked provider teardown kill line stops appearing on this path — justified
  3. New shared predicate resume_takes_tool_search_replay in agent_sdk/tool_search.py — justified (2 counted consumers: providers/acp.py:1144, chat_runner.py:7728; grep resume_takes_tool_search_replay; replaces the inline condition, so one definition, not two)
  4. Provider's inline replay condition now evaluates through that function, same behavior — justified
  5. Three specs updated in the same commit — justified (AGENTS.md mandate)
  6. Existing prefetch-wiring tests switch to tool_search-off config to keep exercising the load path — justified (declared; the pinned behavior is the load wiring, not the toggle)

Inputs check out: cfg.agent.tool_search is the same value the factory threads to the provider (loader.py:5120), and select_provider_backend is the factory's own gate (members.py:146), not a second copy. Only one speculative_resume=True call site exists (chat_runner.py:7882), so no unfixed siblings.

[FIRST-PRINCIPLES-REVIEWED] 6e5c0e6

Description read

[DESCRIPTION-READ] 169e912929fc02bbf03ab61b1013e7755bea844721e7cdfb73a0d0721bbc8420

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 2, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 6e5c0e602cec7dc75a2ca44f1f2bb82f3794d01f and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 6e5c0e6

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

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 6e5c0e6

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

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

@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 2, 2026
@pepmach
pepmach force-pushed the fix/15725-skip-doomed-resume-prefetch branch from 9c3c0f4 to 9422734 Compare October 2, 2026 15:50
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 2, 2026
With Tool Search on, the kiro backend answers a direct dashboard resume
with a fresh native session plus conversation replay instead of
session/load, so a speculative resume can only come back resumed=False
and be refused -- after a full kiro-cli runtime was spawned, waited on
and hard-killed with its whole process group. Every focus of a reopened
chat paid that spawn and saved nothing, and the kill was logged as a
leaked provider teardown, which reads as a leak.

Extract the provider's decision into one pure function,
resume_takes_tool_search_replay, read by the provider start once a
resume sid is in hand and by _eager_spawn before any runtime exists. A
prefetch the provider would replace with a replay is left to the first
turn under its own log reason, "left to first turn (tool-search
replay)". The first real turn keeps its fresh-session-plus-replay
behaviour, the refusal path for every other case stays as it is, and a
resume that stays native (Tool Search off, a non-kiro backend, a channel
identity) still prefetches.

Specs: providers.md (the predicate), learn-cron-dashboard.md (the
slot_focused prefetch) and session.md (the get_or_create row).

Fixes #15725
@pepmach
pepmach force-pushed the fix/15725-skip-doomed-resume-prefetch branch from 9422734 to 6e5c0e6 Compare October 2, 2026 19:50
@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: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Oct 2, 2026

@iamwhatever iamwhatever left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed: moving the provider's replay decision into one pure predicate and asking it before spawning removes a spawn the provider was certain to kill. The prefetch reads the same tool_search value and backend selection the factory uses (config/loader.py:5120, :5208); only the focus-resume path is gated and fresh eager spawn is untouched. Tests check the skip log, the no-spawn outcome and both native-resume paths. Optional: a unit test for resume_takes_tool_search_replay with a channel id and a non-dashboard key.

@iamwhatever
iamwhatever added this pull request to the merge queue Oct 2, 2026
@bolichen97
bolichen97 enabled auto-merge (squash) October 3, 2026 01:30
@bolichen97
bolichen97 merged commit f535e6b into main Oct 3, 2026
97 checks passed
@bolichen97
bolichen97 deleted the fix/15725-skip-doomed-resume-prefetch branch October 3, 2026 01:31
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] With Tool Search on, resume prefetch of a reopened chat always spawns a kiro-cli runtime and then kills it

3 participants