• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lsm / neokai / 25006517222
82%

Build:
DEFAULT BRANCH: dev
Ran 27 Apr 2026 04:17PM UTC
Jobs 34
Files 545
Run time 3min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Apr 2026 04:17PM UTC coverage: 82.976% (+0.006%) from 82.97%
25006517222

push

github

web-flow
fix(daemon): make AskUserQuestion survive daemon restart and clean up dead sessions (#1659)

* fix(daemon): make AskUserQuestion survive daemon restart and clean up dead sessions (#138)

Before this change, a daemon restart while a session was in
`waiting_for_input` left the question card as a dead-end: the persisted
state still rendered the form, but the in-memory `pendingResolver` was
gone, so Submit/Skip threw "No pending question" and the user had no
way out short of refreshing the whole session.

This change adds three coordinated fixes:

- **Restart-survival path on the handler** — `AskUserQuestionHandler`
  keeps a `queuedAnswers` map keyed by toolUseId. When Submit/Skip RPCs
  arrive after the in-memory resolver is gone, the handler stores a
  PermissionResult, transitions out of waiting_for_input, and injects a
  synthetic `tool_result` user message into the streaming queue so the
  resumed SDK query can continue. If the SDK re-issues the
  AskUserQuestion call instead of treating the prior tool_use as
  resolved, `createCanUseToolCallback` consumes the queued answer
  immediately. Both halves are intentionally redundant.

- **Orphan cleanup on session death** — new `markQuestionOrphaned()`
  flips the persisted question to a `cancelled` ResolvedQuestion with
  `cancelReason='agent_session_terminated'`. Wired into SpaceRuntime
  Step 1 (force-completion / block) and Step 1.5 (auto-complete) so a
  force-completed session shows "Question cancelled — agent session
  ended" rather than vanishing.

- **Step 1.5 guard for waiting_for_input** — the auto-complete loop
  now spares sessions whose ProcessingState is `waiting_for_input`
  (the agent is not stuck — a human is). Long-term fix is to remove
  Step 1.5 entirely; this is the interim guard.

New telemetry: `question.orphaned`, `question.injected_as_tool_result`.

UI: `QuestionPrompt` accepts a `cancelReason` prop and renders the
orphan case distinctly. `useSessionQuestionState` already thread... (continued)

9438 of 12638 branches covered (74.68%)

Branch coverage included in aggregate %.

189 of 214 new or added lines in 5 files covered. (88.32%)

3 existing lines in 1 file now uncovered.

67181 of 79701 relevant lines covered (84.29%)

303.09 hits per line

Uncovered Changes

Lines Coverage ∆ File
14
88.02
-3.2% packages/daemon/src/lib/agent/agent-session.ts
11
82.4
-0.38% packages/daemon/src/lib/space/runtime/task-agent-manager.ts

Coverage Regressions

Lines Coverage ∆ File
3
88.02
-3.2% packages/daemon/src/lib/agent/agent-session.ts
Jobs
ID Job ID Ran Files Coverage
1 daemon-online-features-1 - 25006517222.1 27 Apr 2026 04:18PM UTC 288
19.7
GitHub Action Run
2 daemon-0-shared - 25006517222.2 27 Apr 2026 04:17PM UTC 29
84.83
GitHub Action Run
3 daemon-online-rpc-4 - 25006517222.3 27 Apr 2026 04:19PM UTC 288
20.03
GitHub Action Run
4 daemon-online-space-2 - 25006517222.4 27 Apr 2026 04:19PM UTC 288
26.81
GitHub Action Run
5 daemon-online-rewind-1 - 25006517222.5 27 Apr 2026 04:19PM UTC 288
19.23
GitHub Action Run
6 daemon-4-space-storage - 25006517222.6 27 Apr 2026 04:18PM UTC 110
58.2
GitHub Action Run
7 daemon-online-git - 25006517222.7 27 Apr 2026 04:18PM UTC 288
18.22
GitHub Action Run
8 daemon-5-space-other - 25006517222.8 27 Apr 2026 04:18PM UTC 106
33.92
GitHub Action Run
9 daemon-5-space-runtime - 25006517222.9 27 Apr 2026 04:18PM UTC 105
40.37
GitHub Action Run
10 daemon-online-rpc-3 - 25006517222.10 27 Apr 2026 04:18PM UTC 288
20.05
GitHub Action Run
11 daemon-online-cross-provider-4 - 25006517222.11 27 Apr 2026 04:18PM UTC 288
19.65
GitHub Action Run
12 daemon-online-space-1 - 25006517222.12 27 Apr 2026 04:19PM UTC 288
26.54
GitHub Action Run
13 daemon-online-lifecycle - 25006517222.13 27 Apr 2026 04:18PM UTC 288
19.43
GitHub Action Run
14 daemon-online-cross-provider-2 - 25006517222.14 27 Apr 2026 04:18PM UTC 288
17.98
GitHub Action Run
15 daemon-5-space-agent - 25006517222.15 27 Apr 2026 04:18PM UTC 139
29.3
GitHub Action Run
16 daemon-online-coordinator - 25006517222.16 27 Apr 2026 04:17PM UTC 288
6.28
GitHub Action Run
17 daemon-5-space-workflow - 25006517222.17 27 Apr 2026 04:17PM UTC 85
35.8
GitHub Action Run
18 daemon-online-cross-provider-3 - 25006517222.18 27 Apr 2026 04:17PM UTC 288
6.27
GitHub Action Run
19 daemon-online-components - 25006517222.19 27 Apr 2026 04:17PM UTC 288
15.4
GitHub Action Run
20 web - 25006517222.20 27 Apr 2026 04:19PM UTC 248
79.51
GitHub Action Run
21 daemon-online-convo - 25006517222.21 27 Apr 2026 04:18PM UTC 288
18.93
GitHub Action Run
22 daemon-1-core - 25006517222.22 27 Apr 2026 04:18PM UTC 292
29.6
GitHub Action Run
23 daemon-online-rpc-2 - 25006517222.23 27 Apr 2026 04:19PM UTC 288
18.63
GitHub Action Run
24 daemon-online-features-2 - 25006517222.24 27 Apr 2026 04:18PM UTC 288
19.42
GitHub Action Run
25 daemon-online-agent-sdk - 25006517222.25 27 Apr 2026 04:18PM UTC 288
19.03
GitHub Action Run
26 daemon-online-features-3 - 25006517222.26 27 Apr 2026 04:18PM UTC 288
15.78
GitHub Action Run
27 daemon-online-rewind-2 - 25006517222.27 27 Apr 2026 04:19PM UTC 288
19.65
GitHub Action Run
28 daemon-online-rpc-1 - 25006517222.28 27 Apr 2026 04:18PM UTC 288
19.26
GitHub Action Run
29 daemon-online-mcp - 25006517222.29 27 Apr 2026 04:18PM UTC 288
15.85
GitHub Action Run
30 daemon-online-room-mcp - 25006517222.30 27 Apr 2026 04:18PM UTC 288
17.72
GitHub Action Run
31 daemon-online-websocket - 25006517222.31 27 Apr 2026 04:18PM UTC 288
15.52
GitHub Action Run
32 daemon-online-room-coder-subagents - 25006517222.32 27 Apr 2026 04:18PM UTC 288
17.98
GitHub Action Run
33 daemon-online-sdk - 25006517222.33 27 Apr 2026 04:18PM UTC 288
18.94
GitHub Action Run
34 daemon-2-handlers - 25006517222.34 27 Apr 2026 04:18PM UTC 236
50.1
GitHub Action Run
Source Files on build 25006517222
  • Tree
  • List 545
  • Changed 9
  • Source Changed 8
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #25006517222
  • 9423e030 on github
  • Prev Build on dev (#25005540613)
  • Next Build on dev (#25008225399)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc