# Issue #20339 runtime evidence: Claude background-subagent permission after root turn ends

Host: fs-11 (Linux x86_64). Claude CLI 2.1.303 via proxy hub. Model: Claude Sonnet 5.5, effort High, access mode Supervised.
Client: web (Vite dev), headless chrome-headless-shell 154.0.8037.92 driven by playwright-core over CDP, viewport 1440x1000.
Prompt (both builds): Launch exactly one subagent with the Agent tool using run_in_background: true. The subagent must wait ~5 seconds (run `sleep 5` via Bash), then Read /etc/hosts, then run Bash `cat /etc/hosts`, then report. Immediately after launching it, end your turn with the word LAUNCHED and do not wait for it.

## AFTER: fix/issue-20339 @ d5a51b5747 (worktree /home/ubuntu/wt/issue-20339)
- 14:09:20Z vp run dev -> [dev-runner] serverPort=15521 webPort=7481 baseDir=<wt>/.t3
- t3 project add --title i20339-after /tmp/i20339/proj (project d9365f29-...)
- 14:13:54Z prompt sent (thread 42c75cc7-3a36-4f77-a1a4-32c103eab620)
- 14:14:03.846Z root run ordinal 1 completed; UI shows "LAUNCHED" at 14:14:06, subagent "Sleep, read hosts, report" Running
- 14:14:15.522Z runtime request kind=file-read status=pending created (UI: "File read approval /etc/hosts  Decline | Approve")  <- after root completed
- 14:14:59Z Approve clicked -> resolved 14:15:01.305Z
- 14:15:02.870Z runtime request kind=command (cat /etc/hosts) pending; Approve 14:15:32Z -> resolved 14:15:32.376Z
- 14:15:37Z subagent Finished: "The Read tool and cat returned the same content: [7 entries, redacted]"; root run ordinal 2 (completion delivery) 14:15:37.366Z-14:15:40.049Z
- "no active turn" in dev output / provider log: 0

DB (orchestration_v2_projection_runs / _runtime_requests, read-only):
run_id|status|requested_at|completed_at
run:thread:42c75cc7-3a36-4f77-a1a4-32c103eab620:ordinal:1|completed|2026-10-22T14:13:55.245Z|2026-10-22T14:14:03.846Z
run:thread:42c75cc7-3a36-4f77-a1a4-32c103eab620:ordinal:2|completed|2026-10-22T14:15:37.366Z|2026-10-22T14:15:40.049Z
kind|status|created_at|resolved_at|native
file-read|resolved|2026-10-22T14:14:15.522Z|2026-10-22T14:15:01.305Z|native-request:toolu_013WA1V1zHqbJ8B6AieVeLpR:d0e47481-4f7a-
command|resolved|2026-10-22T14:15:02.870Z|2026-10-22T14:15:32.376Z|native-request:toolu_01AgZM9iwM9T8XXNmkq8dGMX:2717284f-b6d7-

## BEFORE: merge-base f054d1b801 (worktree /tmp/i20339/before)
- 14:16:37Z vp run dev -> [dev-runner] serverPort=15222 webPort=7182 baseDir=/tmp/i20339/before/.t3
- t3 project add --title i20339-before /tmp/i20339/proj (project 2952ee7e-...)
- 14:18:39Z prompt sent (thread abe51879-3696-489b-9f6d-291457a2b215)
- 14:18:49.381Z root run ordinal 1 completed ("LAUNCHED")
- subagent: sleep 5 ran; Read /etc/hosts and cat /etc/hosts each failed with tool error, no approval card ever shown
- 0 runtime requests recorded for the thread
- Subagent final: "The Read tool on hosts failed twice with Claude V2 adapter has no active turn for this tool request. cat /etc/hosts in Bash failed twice with the same error."

Provider event log (logs/provider/events.<thread>.log) tool_result errors:
L32 2026-10-22T14:18:58.370Z "tool_use_id":"toolu_01WgcmPa6k63uX5tYGHufc8H" Claude V2 adapter has no active turn for this tool request.
L39 2026-10-22T14:19:01.124Z "tool_use_id":"toolu_016GLvQ9v2jt6U4jPgvrmHLZ" Claude V2 adapter has no active turn for this tool request.
L40 2026-10-22T14:19:01.145Z "tool_use_id":"toolu_014kxHwguhVnHCCcvaydELv5" Claude V2 adapter has no active turn for this tool request.
L45 2026-10-22T14:19:09.411Z "tool_use_id":"toolu_011UWkNUgaB1VbtneamYT6C5" Claude V2 adapter has no active turn for this tool request.
L48 2026-10-22T14:19:13.685Z "tool_use_id":"toolu_01W73ZvPTNdLXmRBccrhiSfC" Claude V2 adapter has no active turn for this tool request.`

DB:
run_id|status|requested_at|completed_at
run:thread:abe51879-3696-489b-9f6d-291457a2b215:ordinal:1|completed|2026-10-22T14:18:40.580Z|2026-10-22T14:18:49.381Z
run:thread:abe51879-3696-489b-9f6d-291457a2b215:ordinal:2|completed|2026-10-22T14:19:13.704Z|2026-10-22T14:19:16.778Z
runtime_requests
0
