Commit 65e709c
committed
fix(workflow): cap Claude turns + forbid background/polling in upgrade-deps
Run 24545325671 showed the `Check upgrade dependencies` step stuck for
40+ minutes in a busy-wait loop: Claude had backgrounded `just build`
and was polling `ps aux | grep "just build"` / `pgrep` / `sleep` every
few seconds to check if it was done. Each poll was a full model
round-trip, so the session never ended even though no real work was
happening.
- Add a 200-turn cap via `--max-turns 200` so a runaway agent session
can no longer burn an unbounded amount of Actions time.
- Add an explicit "Running long commands" rule to the prompt that
forbids backgrounding (`&`, `nohup`, `disown`, etc.) and forbids
polling with `ps`/`pgrep`/`sleep` loops. The Bash tool's 20-minute
per-call timeout is plenty for `just build` and `pnpm test`, and
foreground calls give Claude the exit code and output in one shot.1 parent 1175d99 commit 65e709c
1 file changed
+19
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
115 | 133 | | |
116 | 134 | | |
117 | 135 | | |
118 | 136 | | |
119 | | - | |
| 137 | + | |
120 | 138 | | |
121 | 139 | | |
122 | 140 | | |
| |||
0 commit comments