# bb e2e check: one long-lived `claude` process per thread, kept alive across turns # dev instance: worktree 16ceb3a54, App http://localhost:14796, Server http://localhost:22796, Host daemon http://127.0.0.1:30796 # data dir: /home/sawyer/.bb-dev/projects-bb-.claude-worktrees-wf_242c3e11-a10-14-36521054d605 # host daemon pid: 2414254 (found via `ss -ltnp | grep :30796`) $ pnpm bb:dev thread spawn --project proj_gatbfz5kej --provider claude-code --permission-mode accept-edits --title "1654 pid check" --prompt "Reply only with ok." --json -> thread thr_bdragpqzef (turn 1 completed, status idle at 07:35) $ pstree -p -T 2414254 | grep -v esbuild |-MainThread(2422114)---claude(2422530) $ ps -o pid,ppid,etimes,lstart,args -p 2422114,2422530 PID PPID ELAPSED STARTED COMMAND 2422114 2414254 32 Tue Aug 18 07:34:55 2026 node ... apps/host-daemon/dist/bb-claude-code-bridge.mjs (provider-claude-code bridge) 2422530 2422114 31 Tue Aug 18 07:34:56 2026 /home/sawyer/.local/bin/claude --output-format stream-json --verbose --input-format stream-json --thinking adaptive --thinking-display summarized --effort medium --model ... --permission-prompt-tool stdio $ date Tue Aug 18 07:35:29 AM UTC 2026 # thread status at this point: $ curl -s $BB_SERVER_URL/api/v1/threads/thr_bdragpqzef | python3 -c "import json,sys;d=json.load(sys.stdin);print(d['status'],d['runtime'])" idle {'displayStatus': 'idle', 'hostReconnectGraceExpiresAt': None} # --- second turn on the same thread --- $ pnpm bb:dev thread tell thr_bdragpqzef "Reply only with ok." --json { "threadId": "thr_bdragpqzef", "ok": true, "mode": "steer" } $ pnpm bb:dev thread wait thr_bdragpqzef --json "matched": true, "target": { "kind": "status", "status": "idle" } $ pstree -p -T 2414254 | grep claude |-MainThread(2422114)---claude(2422530) $ ps -o pid,ppid,etimes,lstart -p 2422530 PID PPID ELAPSED STARTED 2422530 2422114 60 Tue Aug 18 07:34:56 2026 # => the SAME claude process (pid 2422530, started 07:34:56) served both turns and stays alive while the thread is idle. # It only goes away on an explicit stop/release/archive of the thread or when the host daemon (bb server) restarts. # # For comparison, on the user's real bb instance on this machine (not touched, only observed with ps) a bridge-spawned # `claude --output-format stream-json ... --permission-prompt-tool stdio` process had been alive for 53313 s (~14.8 h). # --- workaround check: releasing the idle runtime spawns a fresh claude process on the next send --- $ pnpm bb:dev thread stop thr_bdragpqzef --json { "ok": true, "threadId": "thr_bdragpqzef" } $ pstree -p -T 2414254 | grep -c claude 0 $ pnpm bb:dev thread tell thr_bdragpqzef "Reply only with ok." --json ; pnpm bb:dev thread wait thr_bdragpqzef --json ok / matched status idle $ pstree -p -T 2414254 | grep claude |-MainThread(2422114)---claude(2452544) <- NEW pid (was 2422530); this process reads credentials fresh at startup $ date Tue Aug 18 07:38:25 AM UTC 2026