[BUG] Remote Control session: background Bash tasks killed ~5-7 min after launch while CLI host in tmux stays alive
Summary
In a Remote Control-driven CLI session, background Bash tasks (run_in_background: true) are externally stopped ~5–7 minutes after launch, even though the claude host process (running inside tmux) stays alive the whole time and the tasks' own timeouts (600000 ms) are never reached. Tasks shorter than ~5 minutes complete normally. The same long-running command completes fine when run as a foreground Bash tool call.
Environment
- Claude Code CLI 2.x running inside tmux on Ubuntu (Linux 7.0.0-29-generic), launched over SSH from another machine
- Session driven via Remote Control from the mobile app — no user-initiated stop action occurred at any point
- Host healthy throughout: no OOM (clean dmesg/journalctl), ~5 GB RAM free
Expected behavior
Background tasks are children of the local claude process. With that process alive in tmux, tasks should run to completion (or their own timeout) regardless of the mobile client's connectivity, sleep state, or reconnects.
Actual behavior
Three background tasks in one session were stopped ~5–7 minutes after launch, each reported to the model as status "killed" / "was stopped", with only [killed] in the task output file:
| Task | Kind | Outcome | Killed/finished at (PDT, 2026-08-28) |
|---|---|---|---|
| b0ijjw7ga | codex CLI run | killed ~7 min in | 16:54:29 |
| bb1a4f0a0 | identical codex CLI run (relaunch) | killed ~7 min in | 17:14:46 |
| b2nzdprra | plain shell until-poll loop (no codex) | killed ~7 min in | 17:40:39 |
| bfc27ooox | codex CLI run (control, earlier) | completed (~8 min) | 14:26:07 |
| bm2ajxc7i | 3-minute no-op probe (control) | completed, exit 0 | ~18:06:45 |
Additional oddity: a zero-byte task output file (b8hbm0ukl.output, 18:05:40) appeared with no corresponding tool call in the session.
Repro
- Start Claude Code CLI inside tmux on a Linux host.
- Drive the session via Remote Control from the mobile app.
- Have the model launch a Bash tool call with
run_in_background: truethat runs longer than ~5 minutes (another CLI tool, or a plainuntil-poll loop). - Wait without any user action. The task is stopped ~5–7 minutes in. Tasks under ~5 minutes complete normally.
Notes
- Documentation research found no documented mechanism that stops background tasks on this interval: background work is documented as tied to the local process (which persisted), the 1-hour idle stop for unattached sessions doesn't match, and the nearest documented number is Remote Control's 5-minute forwarded-dialog expiry (
dialogExpiry) — which governs dialogs, not tasks, but is suspiciously close to the observed interval.
🤖 Filed with Claude Code on the user's behalf