{"version":"2.1.310","anchor":"orphan-background-agent-restore-logic-gated-by-tengu-wondrou","canonical_anchor":"orphan-background-agent-restore-logic-gated-by-tengu-wondrou","heading":"Resuming subagents: incremental transcript fetch and restoring orphaned background agents","tier":"soon","area":"Sessions","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.310\/e\/orphan-background-agent-restore-logic-gated-by-tengu-wondrou","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.310","markdown":"### Resuming subagents: incremental transcript fetch and restoring orphaned background agents\n\nSubagent transcripts can be fetched incrementally against the local copy, and new switch-gated code finds launched background agents to restore on resume\n\n**What**\n\nA subagent is a helper that Claude starts to work on part of a task. Each one keeps a transcript, a record of what it did, plus a small metadata file kept next to it called a sidecar. Two pieces of code for bringing subagents back after a session resumes changed:\n\n- Fetching transcripts against the local copy: the fetch of a subagent transcript in a cloud session gained a `verify_local` mode. It reads the local transcript, notes which events it already holds, and writes only the missing ones. It can report `local_current` when the local copy is already up to date, and `local_read_fail` when the local copy cannot be read. It can also restore the sidecar from the stream (`subagent_sidecar_from_stream`). Before, it only wrote when there was no local copy at all.\n\n- Restoring orphaned background agents: new code works out which built-in background agents launched earlier can still be resumed or still need their results passed on. It reads agent sidecars and agent metadata events, and logs errors with the prefix `[orphanAgentRestore]`. It depends on the `tengu_wondrous_island` server switch, which falls back to off. Nothing has been read about that switch.\n\n**Why**\n\nResumed or remote subagents can catch up on missing history without duplicating or overwriting what is already saved, and background agents left behind by an earlier run may be picked up again on resume.\n\n- Flag `tengu_wondrous_island`: Not enough to say (read for one account on one subscription tier against v2.1.310; this account: no value returned, anonymous baseline: no value returned, compiled default: off) These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release.\n- Area: Sessions\n- Tier: Nothing to try yet\n- Useful: 4\/5\n- Signal: 5\/5\n- Scope: individual\n- Heads-up: no\n- Present in the build but not switched on"}