Skip to content

A Ticket run reads as Silent while its session runs a long, CPU-busy command #2247

Open

Description

@JacobStephens2

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.

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 once quiet_age() reaches inbox.silent_minutes. quiet_age comes 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_id and its start identity (src/logs/command_record.rs:93, process_identity), so the running thirdshift process can find its own descendants.

Desired behavior:

  1. 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.
  2. 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.
  3. 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".
  4. Linux and macOS. Read descendant CPU time from /proc on Linux and from ps/proc_pidinfo on 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 the inbox.silent_minutes / logs.waiting_line_minutes reference) and the GLOSSARY.md Silent entry say that CPU activity in the session's processes counts as working.

Out of scope:

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.

Related

#1499, #1500, #1495, #815.

Activity

  1. added
    bug
    ready-for-human
    on Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugready-for-human

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions