A session drops to "waiting" the moment its turn ends, so a twenty-minute build, a subagent, or a workflow — the reason the session is still alive — is invisible from the list, and users interrupt sessions that are mid-work. thinking cannot express this: it only describes the current turn, and from the list there is no way to tell "this finished" from "this handed off to something that is still running", which is exactly when you want to leave a session alone.
Proposal: publish the background_tasks that Claude Code's own Stop hook already reports as metadata.activity — a shape MetadataSchema already parses and the session info screen already renders; the app was only missing a producer — and give the session-list dot a background state. Reading it from the hook (rather than the SDK stream) makes it work in both launch modes, since the claude binary fires hooks whether happy-cli drives it through the PTY or the SDK.
It composes with #1587, which addresses the same annoyance from the other end (deferring the idle report while an SDK subagent runs): with both, a subagent keeps the session thinking, and anything still running past turn end shows as background.
The call I'd like your read on: is hook-produced metadata.activity the shape you want for this, or would you rather it wait behind #1587?
A working implementation is up at #1612 (12 new CLI tests, live end-to-end capture attached) — happy to reshape it per your direction.
A session drops to "waiting" the moment its turn ends, so a twenty-minute build, a subagent, or a workflow — the reason the session is still alive — is invisible from the list, and users interrupt sessions that are mid-work.
thinkingcannot express this: it only describes the current turn, and from the list there is no way to tell "this finished" from "this handed off to something that is still running", which is exactly when you want to leave a session alone.Proposal: publish the
background_tasksthat Claude Code's ownStophook already reports asmetadata.activity— a shapeMetadataSchemaalready parses and the session info screen already renders; the app was only missing a producer — and give the session-list dot abackgroundstate. Reading it from the hook (rather than the SDK stream) makes it work in both launch modes, since theclaudebinary fires hooks whether happy-cli drives it through the PTY or the SDK.It composes with #1587, which addresses the same annoyance from the other end (deferring the idle report while an SDK subagent runs): with both, a subagent keeps the session
thinking, and anything still running past turn end shows asbackground.The call I'd like your read on: is hook-produced
metadata.activitythe shape you want for this, or would you rather it wait behind #1587?A working implementation is up at #1612 (12 new CLI tests, live end-to-end capture attached) — happy to reshape it per your direction.