Sol/Astra: `Worker.ts wait` defaults to 540 s, but Claude Code moves a subagent's foreground Bash call to the background after 180 s, and the codex run is then killed
Maintainers usually reply within 6 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 85/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- tooling
Research direction
Start at LIFEOS/TOOLS/Worker.ts:179, where WAIT_DEFAULT_SECONDS is set to 540, and check how --max-seconds overrides it in the wait command. Lower the default to 150, then update the "blocks for up to 540 seconds" sentence in agents/Sol.md and agents/Astra.md. Done when a Sol audit loops on wait in the foreground without being backgrounded and completes with a verdict.
Written by the indexing model from the issue text.
Description
What. agents/Sol.md and agents/Astra.md start the codex helper in the background and then wait in the foreground with bun ~/.claude/LIFEOS/TOOLS/Worker.ts wait <lane> --slug <slug> (Bash timeout: 560000). With no --max-seconds, the wait uses WAIT_DEFAULT_SECONDS = 540 (LIFEOS/TOOLS/Worker.ts:179).
Claude Code 2.1.322 moves a subagent's foreground Bash call to the background once it has run for 180 s (the client's constant is 180000 ms, applied to async subagents unless the prompt cache setting is "off" or "1h").
What happens. Observed timeline of one failed Sol audit:
| Time | Event |
|---|---|
| +0 s | The wrapper starts CodexProgress.ts in the background and waits in the foreground |
| +3 min | The client moves the wait to the background |
| +3 min 15 s | The wrapper has nothing left in the foreground, so it ends its turn |
| +8.5 min | Both background tasks end with "failed with exit code 144", and the helper logs failed to send SIGTERM ... EPERM |
| Result | verdict "error", exit_code null, duration 512,701 ms, no audit |
Shorter runs sometimes survive, because codex can finish inside the window between the wrapper going idle and the kill (two earlier runs of 405 s and 464 s were backgrounded the same way and still finished). Longer runs are at risk; the one observed failure ended at 512 s.
Suggested fix. Keep every single wait under 180 s, so the wrapper stays in the foreground and simply loops on running, as both agent files already instruct:
- Lower
WAIT_DEFAULT_SECONDSto 150 (any value comfortably under 180 works). This fixes every caller at once. - Update the "blocks for up to 540 seconds" sentence in both agent files to match.
In practice, ten consecutive Sol audits that waited at most 150 s per call each made 2 to 4 waits, none was moved to the background, and all of them finished.
Open question for the maintainers. What ends the backgrounded tasks about five minutes after the wrapper goes idle? It may be tied to the subagent's lifecycle or to the prompt-cache window. If that kill is intended client behaviour, then any LifeOS wrapper that holds a long foreground call is exposed, not only these two.
- Dominant language
- TypeScript
- Stars
- 19.8k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from danielmiessler/LifeOS
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
danielmiessler/LifeOS#2830 ·
Maintainers usually reply within 6 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
danielmiessler/LifeOS#2822 ·
Maintainers usually reply within 6 days
-
Difficulty 1/5 Under an hour Newbie friendliness 80/100
danielmiessler/LifeOS#2818 ·
Maintainers usually reply within 6 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
danielmiessler/LifeOS#2817 ·
Maintainers usually reply within 6 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
danielmiessler/LifeOS#2808 ·
Maintainers usually reply within 6 days
All issues in danielmiessler/LifeOS
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
tintinweb/pi-subagents#459 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
freshframework/fresh#3920 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
area: client enhancement priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
opensro-dev/opensro#3681 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day