Skip to content

fix: cancel a lost tool call at its own silence bound - #34763

Merged
bolichen97 merged 1 commit into
mainfrom
fix/tool-stall-window-reset-by-cotenant
Nov 12, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/tool-stall-window-reset-by-cotenant

Conversation

@bolichen97

@bolichen97 bolichen97 commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A tool call that is lost next to a sub-agent launch is cancelled at its own silence bound and handed back to the model, instead of holding the turn for half an hour.

On a shared kiro-cli runtime a built-in file edit dispatched next to a sub-agent launch can be auto-approved and never run. A co-tenant sub-agent's frames, which land while the tool-stall watchdog awaits the liveness oracle, restart the watchdog's whole idle window, and a non-shell call matches no narrowing tag, so it waits the build-scale suspect window. The reporter's turn hung for 32 minutes.

Why it matters

Anyone who runs sub-agents on the default kiro-cli backend can lose a turn to one dropped call, with no signal until the hard cap.

Not a goal

  • Finding why kiro-cli drops the call; it has no identified root cause.
  • Changing how shell calls are judged; they keep the oracle rules.
  • Giving the task planner, plan refine and eval their own recovery; they still end on the stall (recorded in the decision entry).

What changed (motivation → approach → change)

Symptom: the lost call is never recovered in time. Causes: a frame that lands during the oracle await resets the session's own idle clock, and the empty-queue arm never runs while a co-tenant talks. Change: the guard advances only the stale clock, and each non-shell call on kiro-cli and KAS gets its own silence timer (built-ins and url-declared MCP tools 5 min, other MCP tools 30 min, sub-agent calls 10 min from the sub-agent's own frames). On expiry the turn takes the non-lethal tool-stall recovery naming the call. A timer runs only while the session can prove it would see the call's activity, otherwise the oracle and the hard cap judge the call. Every bound is a watchdog setting; the decision entry docs/decisions/ records the rule it supersedes. The keepalive route reads the sub-agent model-wait window (watchdog.model_silent_probe_secs) from the session handle's WatchdogSettings snapshot (live_turn._model_think_window), never from config.json on the event loop.

Backwards compatibility

Compatible: nothing that is accepted today is rejected; the timers only add a bound on calls that previously waited for the oracle and the hard cap, and every bound can be set to 0.

Removes nothing: no key, function, record or path is removed or renamed.

Tests

  • test_acp_tool_silence_visibility.py::test_a_spawn_beat_carries_its_childrens_activity_through_the_provider[quiet|moving]: through prompt() on a real AcpProvider over a real AcpSessionProvider, a spawn_sub_agents beat naming quiet children is cut one sub-agent bound after their last activity, and with moving children the turn ends end_turn. Red against the mutants that drop or ignore activity_at in AcpProvider.note_tool_heartbeat.

  • test_kas_mcp_live_reinject.py::...::test_a_handle_no_keepalive_reaches_stays_unrouted_across_the_swap: the False carry row for MCP re-injection.

  • test_a_kiro_crew_call_is_timed_only_where_its_keepalive_reaches[non-core-server-*]: a call on kirocrew-panel, a non-core KIROCREW_BIN_MCP_SERVERS server.

  • The 18 changed test files and both ratchets: 1541 passed.

  • Rebased onto main after review (26e8b0c); patch unchanged by the rebase. Head 2a21bc2.

  • Review repairs at 2a21bc2: the heartbeat route reads every member of a wave (cap SPAWN_BATCH_MEMBERS_MAX, was 64) and counts a sub-agent running its prompt hooks as moving now (test_tool_heartbeat_route.py, two new tests, red with the live_turn.py hunk reverted, 2 failed 9 passed; green with it). The recovery-marker parity tests take TOOL_STALL_RECOVERY_PREFIX from kiro_crew.timed_out_call; the facade mirror lists _join_continued.

  • Lane run at 2a21bc2 (DevSpace): the changed test files plus test_recovery_marker_parity, test_recovery_card_prefixes, test_recovery_card_parity, test_facade_mirror_guards, test_flake_pattern_ratchet: 1580 passed (exit 0); test_acp_provider, ratchet and heartbeat route again after the final edit: 182 passed. check_harness_parity, check_comment_history, check_brand_name, check_file_line_cap (0 FAIL), flake8, isort clean; mypy --platform linux src/kiro_crew: no issues.

  • CI on the previous head caught test_sessions_parts_facade.py::test_every_project_name_an_owner_serves_is_named_for_type_checkers (the new SPAWN_BATCH_MEMBERS_MAX import in live_turn.py); the facade now names it for type checkers, and that file plus test_facade_mirror_guards, the heartbeat route tests and the flake ratchet pass (159 passed), mypy --platform linux clean.

  • Manual verification repros re-run at this head: the clause-2 lost-edit repro and the co-tenant oracle-await repro both exit 0.

  • Rebased onto main after review; patch unchanged (head 91b871d; range-diff differs only in decisions README context and two context lines in session_provider.py). Related tests re-run on a DevSpace at 91b871d: test_acp_tool_silence_timer, test_acp_tool_silence_visibility, test_acp_tool_stall_cotenant_await: 164 passed; scripts/docs-lint.sh passes.

  • Rebased onto main after review (bb7048c); the four conflicts (decisions README rows, browser.md, the session_handle_dispatch.py docstring, the wave.py imports) keep both sides. Range-diff shows only those resolutions.

  • Review repair at e174914a04 (Opus lane, no blocking call on the event loop): the keepalive route no longer calls KiroCrewConfig.load() per beat. test_tool_heartbeat_route.py::test_a_wave_heartbeat_loads_no_config_on_the_event_loop drives the real api_session_keepalive with subagent_ids and fails if config is loaded; test_the_model_window_is_the_session_handles_watchdog_snapshot pins a 600 s handle window and the no-handle default. On a DevSpace: both pass at e174914a04 (exit 0), and with the live_turn.py and sessions.py hunks reverted to the pre-repair head both fail (exit 1: assert 1 == 0 load count; [('tc', None)] vs the stale stamp).

  • User-scenario repros re-run at e174914a04 against base bb7048c: co-tenant oracle-await repro base exit 1, fix exit 0 (S1 and S2 cut at +3.03 s and +3.02 s); lost-edit repro base exit 1 (turn timeout at +14.8 s), fix exit 0 (edit cut at +3.01 s and handed back as a timeout error). flake8 and isort on the changed files, check_black_formatting.py, check_comment_history.py and check_brand_name.py: exit 0. The test files and gates run in GitHub CI.

  • Rebased onto main after review; patch unchanged (e8283ce: the three main commits since bb7048c touch no file of this PR; range-diff =).

  • CI at ae020be caught check_file_line_cap.py: main's feat(acp): share one agent process across dashboard chats, behind the chat_runtime_sharing preview #33855 took acp/session_provider.py to 1,989 lines and this change to 2,007. touch_activity, note_tool_heartbeat and mark_keepalive_routed move whole into acp/session_provider_keepalive.py, bound by name in the class body as session_provider_shared is; the file is 1,981 lines. On a DevSpace at fa7bf6e: check_file_line_cap.py 0 failures, the three members' tests in test_acp_session_provider.py (4 passed), both heartbeat-route repros and both user-scenario repros exit 0, flake8, isort, check_black_formatting.py, mypy --platform linux on the two files, check_comment_history.py, check_brand_name.py, check_harness_parity.py and scripts/docs-lint.sh exit 0.

  • Rebased onto main after review; patch unchanged (e1b079c; range-diff =). CI at fa7bf6e failed test_wait_discipline_ratchet.py::test_the_scan_matches_known_sites and test_updates_handlers_facade.py::test_every_name_served_from_outside_the_family_is_visible_to_type_checkers, both red on that base and fixed on main by test: give the boot apply sigterm test the 30 s wait ceiling #35625. On a DevSpace, pytest -n0 -p no:cacheprovider on those two node ids: exit 1 at fa7bf6e (2 failed: test_update_boot_apply.py:335 wait_for(10s), Right contains 1 more item), exit 0 at bdae157 (2 passed), exit 1 again at bdae157 with test: give the boot apply sigterm test the 30 s wait ceiling #35625 reverted (2 failed). User-scenario repros (repro-clause1.sh base|fix, repro-clause2.sh base|fix <worktree>) at bdae157 against base e1b079c: co-tenant oracle-await repro base exit 1 (S1 cut at +5.44 s, S2 to the turn timeout at +8.99 s), fix exit 0 (S1 and S2 cut at +3.02 s and +3.03 s); lost-edit repro base exit 1 (turn timeout at +14.8 s), fix exit 0 (Editing notes.md cut at +3.01 s and handed back as a timeout error). Related tests at bdae157 (the changed test files plus the recovery-card parity, facade, flake and wait-discipline guards): 1736 passed; check_file_line_cap.py, check_harness_parity.py and scripts/docs-lint.sh exit 0.

  • Rebased onto main after review; patch unchanged (105933a, head 18571d0; range-diff differs only in context lines of mcp_shared_dispatch.py and browser.py from main's perf: list MCP tools before loading tool handlers #35293). That main carries test(updates): cover gateway_restart and update_boot_apply to the 80% floor #35725, the fix for the Coverage Gate per-file floor that fix(updates): never restart a running gateway; apply at the next start #35088 broke: CI run 43147401306 at bdae157 tested a merge into e1b079c, which lacks it. On a DevSpace at 16ee7bc0e4 against base 1bccaa1 (src/ tree 8b6a0a0013 in both 16ee7bc0e4 and 18571d0; fix(desktop): keep the quit-time update apply across a second quit #35770, the one main commit between, changes only Electron files and a doc): the member repro tool-stall-window-reset-by-cotenant.sh base|fix (co-tenant oracle await) base exit 1 (S1 cut at +5.46 s, S2 to the turn timeout at +8.99 s), fix exit 0 (S1 and S2 cut at +3.04 s and +3.03 s); tool-stall-window-reset-by-cotenant-clause2.sh base|fix <worktree> (lost edit) base exit 1, fix exit 0. The real-runtime repro.py clause1|clause2 (two sessions each with a lost edit under a streaming co-tenant roster; one lost edit under a 60 s suspect window): base exit 1 (turn timeouts at +9.00 s and +15.00 s), fix exit 0 (Editing notes.md cut at +3.06 s and +3.02 s and handed back as a tool stall). An import of the changed MCP and ACP modules and generate_config_baseline.py (no diff): exit 0. The test files and gates run in GitHub CI.
    Proof: not provable -- other: the new modules are imported at collection, so reverting every production hunk only errors at collection; red runs were taken by mutants instead

Manual verification

Both reported-failure repros, scaled windows with a real fake-kiro child over the real runtime reader: base exit 1, fix exit 0 (lost edit cut at +3.01 s, recovery prompt handed to the model).

Related Issues

N/A -- no public issue.

Sibling sweep

Swept: git grep -n "last_own_data_ts|note_tool_heartbeat" -- src/
Sibling: src/kiro_crew/providers/acp.py:1282 -- changed here -- the provider the registry holds now forwards the heartbeat
Sibling: src/kiro_crew/acp/session_provider_mcp_reinject.py:198 -- changed here -- the re-injection swap carries the keepalive mark

Pattern harvest

Not generalizable: a forwarding wrapper that silently dropped a keyword argument; each pin is a test through the public entry point.

Checklist

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

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 18571d092864ca15ccd0b5d8e0c67bc4ae3ed6c0 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 18571d0

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

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

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision 18571d092864ca15ccd0b5d8e0c67bc4ae3ed6c0 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks. The maintainer's decision entry records the new rule and the 90-minute window it replaces. Every bound is a watchdog.* setting that 0 turns off, and nothing is removed or renamed.

Notes

  • The timer now has about seven fail-open exceptions, each added after a review round found a healthy turn being cut. The next one should be judged against the general "can the session see this call's activity?" rule, not added as an eighth special case.

[DESIGN-REVIEWED] 18571d0

Description read

[DESCRIPTION-READ] ea1c59e034597d5cccf648cdc5fb087a3a2af2d41ddac41dfb583fef05b4e02f

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

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ human override accepted

@bolichen97 overrode this lane for 18571d092864ca15ccd0b5d8e0c67bc4ae3ed6c0 via /ai-review override (this commit only).

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

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 18571d0

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

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

@KiroCrewCaptain

KiroCrewCaptain commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: A person should decide

Why: the decider thinks the change is probably fine but estimates a 30% chance that this change introduces a defect, above the 12% limit for approving on its own.

The PR gives each non-shell tool call its own silence timer on kiro-cli and KAS. A call lost beside a busy sub-agent is cut at its bound (5 min for built-ins and url-declared MCP tools, 30 min for other MCP tools, 10 min for sub-agent calls) through the existing non-lethal tool-stall path, and handed back to the model as a timeout to retry on every surface the decision names. A timer runs only while the session can prove it would see the call's activity: unseen sub-agent routes, unknown frame kinds, pending asks, KAS hooks, concurrent readers and handles no keepalive reaches all fall back to the old oracle and hard-cap rules. Shells and introspect keep the old rules. The oracle-await guard change stops a co-tenant's frames from restarting the tool idle window without affecting the stale clock. The keepalive mark survives runtime start, fresh conversations and MCP re-injection, and the heartbeat route stays authenticated and session-scoped. Every new bound is a watchdog setting that is clamped to the turn ceiling and the hard cap, and 0 turns it off. A maintainer listed in MAINTAINERS.md recorded the product decision, and the rule it supersedes had no earlier entry. Tests drive the

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 91b871d1d3 · 7188 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@bolichen97
bolichen97 enabled auto-merge (squash) November 10, 2026 20:17
@bolichen97
bolichen97 force-pushed the fix/tool-stall-window-reset-by-cotenant branch from bc33340 to f1ed431 Compare November 10, 2026 22:25
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 10, 2026
buluoray
buluoray previously approved these changes Nov 10, 2026

@buluoray buluoray 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.

Approve on f1ed431. Both GPT code findings and the SAST pid literal are fixed with tests that a mutation turns red, and the agent-session credits are gone from the decision entry; code is correct. Not mergeable yet: GPT keeps a fenced [BLOCK-MERGE] because the decision's Evidence (:46) still links no maintainer statement, and First Principles still BLOCKs on product shape. Both need Bolin (a decision comment on the PR linked in Evidence, then maintainer overrides). Decisive lines: src/kiro_crew/dashboard/handlers/sessions_parts/live_turn.py:489 (_HEARTBEAT_SUBAGENTS_MAX = SPAWN_BATCH_MEMBERS_MAX, 128 from core_agent_schemas.py:80), src/kiro_crew/dashboard/handlers/sessions_parts/live_turn.py:550 (a child with _prompt_hooks_running counts as moving now), test/test_acp_provider.py (runtime.pid = UNALLOCATABLE_PID), docs/decisions/2026-11-08-a-non-shell-tool-call-has-its-own-silence-timer.md:46 (Evidence still links no on-record artifact)

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 10, 2026
@bolichen97
bolichen97 force-pushed the fix/tool-stall-window-reset-by-cotenant branch from f1ed431 to 2a21bc2 Compare November 10, 2026 23:22
@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 Nov 10, 2026
@bolichen97
bolichen97 force-pushed the fix/tool-stall-window-reset-by-cotenant branch from 2a21bc2 to e609b70 Compare November 11, 2026 01:40
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 11, 2026
@bolichen97
bolichen97 force-pushed the fix/tool-stall-window-reset-by-cotenant branch from e609b70 to dfd1442 Compare November 11, 2026 02:08
@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Nov 11, 2026
@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 11, 2026
@bolichen97
bolichen97 force-pushed the fix/tool-stall-window-reset-by-cotenant branch from 91b871d to ae020be Compare November 11, 2026 21:58
@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 11, 2026
@bolichen97
bolichen97 force-pushed the fix/tool-stall-window-reset-by-cotenant branch from ae020be to fa7bf6e Compare November 11, 2026 22:34
@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 Nov 11, 2026
@bolichen97
bolichen97 force-pushed the fix/tool-stall-window-reset-by-cotenant branch from fa7bf6e to bdae157 Compare November 12, 2026 03:19
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 12, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

Coverage Gate at bdae157 is main's red, not this PR's: the per-file floor fails on src/kiro_crew/gateway_restart.py (58.5%) and src/kiro_crew/update_boot_apply.py (74.8%), neither of which this PR touches, and the push CI on main at e1b079c (run 43140329527) fails Coverage Gate with the same two files. #35725 adds the tests; this PR waits for it and rebases once it lands.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 12, 2026
On a shared kiro-cli runtime a built-in file edit dispatched next to a
subagent launch was auto-approved, never ran, and held its turn for 32
minutes. Two things kept the tool-stall watchdog from recovering it.

A frame that lands while the watchdog awaits the liveness oracle voids
that verdict, since its owner is not known until it is dequeued. The
guard also set the session's own idle clock to now, so a co-tenant
subagent's fanned-out roster frame threw away the idle collected so far
and restarted the whole window. The guard now advances only the stale
clock. The own clock moves for a frame proven to be this session's: one
still queued is judged at dequeue, and one a concurrent
_wait_for_response buffered is counted in _own_ingress_seq unless it is
marked fanout_no_owner.

The co-tenant's frames also kept the empty-queue arm from running at
all, and a non-shell call matched no narrowing tag, so it waited the
build-scale suspect window. Each non-shell call on kiro-cli and KAS now
has its own silence timer, read on every pass of the dispatch loop: it
starts at dispatch and only a frame attributable to that call restarts
it. Built-ins and tools on a url-declared MCP server get 5 minutes,
other MCP tools 30 minutes, sub-agent calls 10 minutes counted from the
sub-agent's own frames. Kiro Crew's own long tools send an MCP progress
heartbeat about every 30 s and a keepalive naming their call; a wait on
a person (an approval, an MCP elicitation) holds its call until it is
answered, and the answer restarts the timer. Shell calls keep the
oracle rules and the hard cap stays the backstop.
Every bound is a watchdog setting, and a decision entry records the
rule this supersedes.

A native sub-agent's calls send nothing while they run and no Kiro Crew
watchdog times them, so any call one has open (a shell, a built-in, a
Kiro Crew wait or ask_question, any other MCP call, its own sub-agent
call) holds its parent's sub-agent call, and a heartbeat naming such a
call counts only as that sub-agent's activity. Every KAS frame naming a
subtask counts as its sub-agent's activity. kiro-cli streams a native
sub-agent under its own session id, which the runtime routes to the
parent only while the parent is the one session registered on it
(AcpRuntime.routes_roster_children_to), so on a shared runtime the
parent's sub-agent call loses its timer and waits for the oracle and the
hard cap.

A timer runs for a call only while the session can prove it would see
that call's activity; where it cannot, the oracle and the hard cap judge
the call. The runtime counts every frame that named a session and
reached none (AcpRuntime.unrouted_child_frames), so a kiro-cli sub-agent
call also loses its timer when its sub-agent's frame was dropped beside
a co-tenant registered for less than one timer read, a window the route
answer alone never sees. A frame of a kind the timer cannot read
retires the timer of the call it names. Every call is paused while an
ask naming no call waits or a KAS hook runs, since a hook can gate a
call and names none, and no timer is read while a concurrent request
reader holds the session's frames. The paused stretch is subtracted
from every call's silence once, even where the consumer also holds an
event meanwhile (it parks on the very ask that paused it, or on any
event while a hook runs).

A call on Kiro Crew's own servers proves it is alive by its heartbeat,
which /api/session-keepalive hands to the provider the gateway's own
registry holds under the session's key; that provider, an AcpProvider,
forwards it to its live AcpSessionProvider. So such a call is timed
only on a handle whose provider that registry published: the registry
DashboardState holds marks each provider it publishes
(kiro_crew.keepalive_route), and the mark reaches the handle across a
runtime start, a fresh conversation and an MCP re-injection. kirocrew
chat and kirocrew run hold their provider in their own process, and a
sub-agent run on a shared handle, eval's own registry and an app's own
runner hold theirs outside that registry, so there the oracle and the
hard cap judge those calls, and every other call keeps its timer.

kiro-cli dispatches introspect and never sends a result frame for it,
and the model's next step can be another call with no text between or a
sibling in the same batch, so introspect gets no timer: its
_meta.kiro.toolName stamp names it on kiro-cli and the oracle and the
hard cap judge it as before. Any other call's timer is retired by the
model's own next text or thinking, since the model starts a new step
only once its calls have returned.

On expiry the turn takes the non-lethal tool-stall recovery naming the
call, handed back to the model on the same session as a timeout error it
may retry: the dashboard and a sub-agent run as their recovery prompt,
and a messaging channel turn, the native Slack turn, an agent channel
member's turn, the CLI chat, the task runner and stream_and_collect
(cron and other background turns) inside the turn, at most
STOP_RECOVERY_MAX_RETRIES times, with the turn's usage summed. The task
planner, the plan refine, eval and the other callers that stream a
prompt themselves still end on the stall; the decision entry records
that cost.
@bolichen97
bolichen97 force-pushed the fix/tool-stall-window-reset-by-cotenant branch from bdae157 to 18571d0 Compare November 12, 2026 08:33
@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 Nov 12, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

/ai-review override first-principles 18571d0 owner-decision: agent: the maintainer decided this product shape: the per-call silence timers are ON by default (5/30/10 min), superseding the 90-minute suspect window, confirmed on 2026-11-10 21:10 PST in #34763 (comment) and recorded in the decisions entry this PR adds.

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@bolichen97 recorded a owner-decision release (class owner-decision) for the first-principles AI finding on 18571d092864ca15ccd0b5d8e0c67bc4ae3ed6c0.

agent: the maintainer decided this product shape: the per-call silence timers are ON by default (5/30/10 min), superseding the 90-minute suspect window, confirmed on 2026-11-10 21:10 PST in #34763 (comment) and recorded in the decisions entry this PR adds.

This decision applies only to this commit. A new push requires a new judgment.

@bolichen97
bolichen97 merged commit cedb77b into main Nov 12, 2026
96 of 98 checks passed
@bolichen97
bolichen97 deleted the fix/tool-stall-window-reset-by-cotenant branch November 12, 2026 10:49
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Nov 12, 2026
@LuisBrel LuisBrel mentioned this pull request Nov 12, 2026
5 tasks done
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.

3 participants