1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! `status` + `wait` - the live-truth command pair.
//!
//! A deliberate, documented departure from the forensic contract: these two answer
//! "NOW", are point-in-time, and are explicitly NON-reproducible (every other command
//! stays reproducible). The verdict is a THREE-WAY JOIN, never an inference from one
//! surface:
//!
//! 1. the harness's session registry (`<claude-home>/sessions/<pid>.json`) - `status`
//! transitions land sub-second, but the file is written ONLY on transitions (never a
//! heartbeat: an hours-old `statusUpdatedAt` just means the state has not changed;
//! the real failure mode is a SIGKILLed session's stale entry, guarded by pid
//! liveness + a process-start-time check against pid reuse);
//! 2. the transcript tail state machine - an unpaired shell/tool call at the tail = a
//! tool in flight (subagent transcripts flush per content block; main lands ~1-3.4s
//! after dispatch); the last assistant record's `stop_reason` is trustworthy on the
//! main lane (0.0-0.3% null) and NORMALLY null mid-message on subagents;
//! 3. owner-process liveness - a `ps`-based probe with a `/proc/<pid>` fallback where
//! ps lacks the flags (unix; other hosts degrade honestly).
//!
//! Growth classification (the F9 trap): a main transcript GROWS while idle (notification
//! enqueues, attachments), so mtime alone is never "busy" - what grew must be classified
//! before any verdict moves toward RUNNING. Child liveness comes from each child
//! transcript's own tail plus the incremental workflow journal (`started` minus `result`
//! = agents in flight); `subagents/*.meta.json` has NO status field and workflow result
//! files are terminal-only.
//!
//! Honesty limits, stated in the output when they bite: a pending PERMISSION prompt
//! lives only in Claude Code process memory (it masquerades as idle until a sidecar
//! exists); the registry covers top-level interactive sessions only.
use ;
use ;
use crate;
use cratemmap_bytes;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;