Problem
The post-result harness watchdog currently defaults to 20 seconds of stdio inactivity after a terminal safe output has been emitted. This is too short for legitimate shell commands in large repositories.
A shell command can spend more than 20 seconds doing useful work without writing to stdout or stderr. Common examples include:
- recursive
find / grep / rg analysis in monorepos
- computing diffs across several branches
- builds and compilations
- test discovery or test execution with buffered output
- package-manager and repository operations that are quiet between phases
This is especially surprising because shell work does not consume model tokens while it runs. The incremental cost is runner CPU time, which is much cheaper than terminating a productive agent session and repeating its model work in a later run.
Observed impact
In github/github, a representative recursive test-file scan took 20.23 seconds without producing stdout. The checkout has approximately 126,000 tracked files and 23,500 Ruby test files. That ordinary scan alone exceeds the current default.
A multi-phase gh-aw workflow repeatedly exhibited this sequence:
- The agent emitted an intermediate safe output such as
add_comment or add_labels.
- The post-result watchdog armed because that output is classified as terminal.
- The agent continued to a later phase and started a legitimate repository scan or build step.
- After approximately 20 seconds without stdio, the harness sent
SIGTERM.
- The harness treated the session as successful because a terminal safe output already existed, even though planned work was unfinished.
Several runs were terminated while selecting candidates. One run had already edited and committed valid changes and logged Now create the PR, but was terminated before it could call create_pull_request.
Proposal
Raise DEFAULT_POST_RESULT_WATCHDOG_IDLE_TIMEOUT_MS from 20 seconds to 2 minutes (120,000 ms) for all harnesses using the shared resolver.
Keep GH_AW_HARNESS_WATCHDOG_TIMEOUT_MS as an override and retain the existing 10-minute maximum.
Two minutes still bounds genuine CLI hang-on-exit behavior while allowing normal quiet shell work in monorepos and routine builds to complete.
Acceptance criteria
Problem
The post-result harness watchdog currently defaults to 20 seconds of stdio inactivity after a terminal safe output has been emitted. This is too short for legitimate shell commands in large repositories.
A shell command can spend more than 20 seconds doing useful work without writing to stdout or stderr. Common examples include:
find/grep/rganalysis in monoreposThis is especially surprising because shell work does not consume model tokens while it runs. The incremental cost is runner CPU time, which is much cheaper than terminating a productive agent session and repeating its model work in a later run.
Observed impact
In
github/github, a representative recursive test-file scan took 20.23 seconds without producing stdout. The checkout has approximately 126,000 tracked files and 23,500 Ruby test files. That ordinary scan alone exceeds the current default.A multi-phase gh-aw workflow repeatedly exhibited this sequence:
add_commentoradd_labels.SIGTERM.Several runs were terminated while selecting candidates. One run had already edited and committed valid changes and logged
Now create the PR, but was terminated before it could callcreate_pull_request.Proposal
Raise
DEFAULT_POST_RESULT_WATCHDOG_IDLE_TIMEOUT_MSfrom 20 seconds to 2 minutes (120,000 ms) for all harnesses using the shared resolver.Keep
GH_AW_HARNESS_WATCHDOG_TIMEOUT_MSas an override and retain the existing 10-minute maximum.Two minutes still bounds genuine CLI hang-on-exit behavior while allowing normal quiet shell work in monorepos and routine builds to complete.
Acceptance criteria