Repository navigation
Description
This was generated by AI during triage.
Problem
Silent is decided only by log growth. A Ticket run is Silent once neither its Session trace nor its Command log has grown for inbox.silent_minutes. A session running one long foreground command writes nothing until that command returns, so healthy work reads as Silent and lands in Needs you. A genuinely hung command looks exactly the same.
On 2026-11-15, one Run showed both cases on the same machine.
Observed (2026-11-15, thirdshift.app, thirdshift #2228, implement on agy · gemini-4-hydrogen-xhigh, thirdshift 0.33.0 Run)
| Gap in the logs | What the session was doing | CPU | Console said |
|---|---|---|---|
| 05:19 → 09:49 (4 h 30 m) | node --test … --test-name-pattern="Fleet Inbox polls…" plus the thirdshift console it started, both hung |
0% for the whole gap | Silent (correct) |
| 10:50:58 → 11:25:30 (34.5 m) | cargo test --locked --bin thirdshift && cargo test --locked --test status --test console …, healthy, spawning test binaries the whole time |
15–25% per process | Silent (false) |
The hang ended only when the maintainer killed the three processes by hand. The session then carried on, committed, and ran its suites.
The other false-Silent cases already reported have the same shape: the session's own process tree keeps working while neither log grows.
- A Run shows as Silent while its session waits on a ScheduleWakeup or background task #1499: a Claude session waiting on a
ScheduleWakeupor a backgroundcargo test. - An Experiment shows as Silent in Needs you while a Trial runs longer than inbox.silent_minutes #1495: an Experiment's Trials.
Agent Brief
Category: bug
Summary: while a Ticket run's session is live, thirdshift writes a periodic working line to the Command log whenever the session's process tree has used CPU since the last line. A busy but quiet session then stays out of Silent, and a hung one still reaches it.
Current behavior:
src/logs/reading/health.rs(observe, lines 104–120) marks a live Command Silent oncequiet_age()reachesinbox.silent_minutes.quiet_agecomes from Command log and Session trace growth only (src/logs/reading/captured_activity.rs).- A foreground tool call or a background task writes nothing to either log until it finishes.
- The Command record already holds
process_idand its start identity (src/logs/command_record.rs:93,process_identity), so the running thirdshift process can find its own descendants.
Desired behavior:
- Working line. While a session is running, the thirdshift process running the Command checks, at the existing waiting-line interval (
logs.waiting_line_minutes, 5 by default), whether the descendant processes of the session's harness process used CPU time since the last check. If they did, and neither log has grown since the last line, it writes one quiet line to the Command log. Example:implement: still working: cargo (pid 1189089) and 4 more used 312 CPU s in the last 5 min. The line names the busiest descendant command, so a reader can see what is running. - No line for idle work. If the process tree used no CPU in the interval (below a small floor, such as 1 CPU second), no line is written. Silence then accumulates as it does today, so a real hang such as the 05:19 case still becomes Silent after
inbox.silent_minutes. - Silent logic unchanged. The Silent check still counts log growth only. Because the working line is ordinary Command log growth, it works the same for every machine in the Fleet, every harness and the Console, with no new reading-side signal. This matches the glossary's rule that "stages that wait on something else write a line at intervals".
- Linux and macOS. Read descendant CPU time from
/procon Linux and fromps/proc_pidinfoon macOS. Where it can't be read, write no line, keeping today's behavior.
Acceptance criteria:
- With a fake harness that runs a CPU-busy child for longer than the silent time and writes nothing, the Command log gets working lines and the Run is never Silent.
- With a fake harness whose child sleeps, using no CPU, for longer than the silent time, no working lines are written and the Run becomes Silent as today.
- Working lines don't repeat while either log is growing on its own.
-
docs/guide.md(the Silent paragraph near line 302 and theinbox.silent_minutes/logs.waiting_line_minutesreference) and theGLOSSARY.mdSilent entry say that CPU activity in the session's processes counts as working.
Out of scope:
- Changing
inbox.silent_minutes' default (Raise the default inbox.silent_minutes from 10 to 31 #1500). - A distinct "waiting until HH:MM" state for
ScheduleWakeup(A Run shows as Silent while its session waits on a ScheduleWakeup or background task #1499's other options). A sleeping wakeup with no busy child stays Silent under this change. - Killing or timing out hung commands.
Why ready-for-human
The maintainer should decide how this relates to #1499. This mechanism covers #1499's background-task cases as well (the cargo test children use CPU). It doesn't cover a bare ScheduleWakeup with nothing running. If the maintainer adopts this approach, #1499 can narrow to the wakeup-only case, and #1500 may become unnecessary.
Activity