Skip to content

[Bug]: Claude background subagents die when T3 restarts the session after auto-compaction or idle, then show as "stopped by the user" #29319

Open

Description

@ktox-dev

Version: T3 Code 0.1.7-nightly.20261102.4066, Linux (Fedora, KDE Plasma on Wayland), provider Claude (claude-opus-5-5).

What happens

Background subagents started with Claude Code's Agent tool (run_in_background: true) run inside the session's claude process. T3 ends and resumes that process several times a day, and every running subagent dies with it, halfway through its work. The restarts are not only T3 updates. In the systemd user journal for 2026-11-02, a t3code-claude-<id>.scope ends:

  • at 07:27 and 09:29 together with t3up.service, which is an update;
  • at 11:41, 12:13, 12:45, 12:48, 12:52, 13:20, 13:25 and 14:14 without an update. These seem to follow auto-compaction or longer idle time in the thread. In one case /compact showed "Compaction canceled" right before.

After the resume, Claude Code reports each of these subagents as "was stopped by the user and won't be resumed". Nobody stopped them, and the agent then refuses to continue the work (SendMessage fails). The work left in the subagents' checkouts stays uncommitted.

Expected

  • An auto-compaction or idle restart of the Claude process does not end subagents that are still running. For example, the process stays up, or the subagents run outside the session's scope.
  • If it has to end them, they are shown as interrupted rather than stopped by the user, so they can be resumed.

Related: #28331 (Claude subagents carried over from an earlier process stay Running). This report is the other side of it: the subagents are actually killed.

Workaround we now use: long background work goes through delegate_task (T3-owned child threads) instead of Claude Code's in-process background agents.

Activity

  1. juliusmarminge commented on Nov 2, 2026

    @juliusmarminge
    Member

    I tried to reproduce this on current main (47f2c8d29e, Linux) with a real Claude Code session. I shortened the 30-minute idle release to 60 seconds in a scratch build so the release would fire during the test. In all four runs the claude process stayed up while its background subagent was working. The server logged orchestration-v2.driver-session.idle-release-deferred each minute and released the process only after the subagent had finished:

    1. One Agent subagent with run_in_background: true running a 7-minute command, with the parent idle.
    2. The same, plus a manual /compact and a follow-up turn while the subagent ran.
    3. A subagent that backgrounded its own command, ended its turn early, then woke up and ran a 5-minute foreground step.
    4. A subagent running a long foreground step, plus /compact with a steered message sent during it.

    So an idle Claude session with a running background subagent is kept alive here. Something else ended your processes at those times. To narrow it down, could you share:

    • For one of the restarts without an update (for example 12:13), the T3 server's log lines from about 2 minutes before to 1 minute after. Search for driver-session, idle-release, claude-query, interrupt, or releaseIfStillIdle. They are in the server's journal, or in ~/.t3/userdata/logs/server.trace.ndjson* for the same time.
    • The full journal lines for that t3code-claude-<id>.scope, including the result line (for example Deactivated successfully or an OOM-kill message).
    • Your Compact idle threads setting (Settings, and any override on the Claude provider).
    • Whether anything else sent messages to that thread around those times, such as another thread's t3_thread_send, or a steer or Stop.
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

    needs more infoInitial triage showed no bug. Awaiting more info

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions