{"version":"2.1.269","anchor":"idle-exit-timer-now-runs-a-caller-callback-right-before-exit","canonical_anchor":"bridge-sessions-can-now-idle-exit-instead-of-just-completing","heading":"Bridge sessions can idle-exit instead of only completing","tier":"soon","area":"Elsewhere","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.269\/e\/idle-exit-timer-now-runs-a-caller-callback-right-before-exit","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.269","markdown":"### Bridge sessions can idle-exit instead of only completing\n\nBridge-spawned sessions can now be set to exit after an idle period, reporting status as idle rather than completed\n\n**What**\n\n- The idle-exit helper (triggered by `CLAUDE_CODE_EXIT_AFTER_STOP_DELAY`) now accepts a callback that runs right before the process actually exits, with errors from it swallowed.\n\n- Bridge-spawned sessions can now be given an `idleExitAfterMs` value; when greater than 0, the child session gets `CLAUDE_CODE_EXIT_AFTER_STOP_DELAY` set, and on clean exit its reported status is \"idle\" instead of \"completed\".\n\n- New scaffolding computes whether a spawned bridge session should be tagged `rc-child`, gated behind the `tengu_bridge_child_auto_mode` flag, and passes it to session spawn along with new `projectThreadChild` and `idleExitAfterMs` parameters \u2014 though the other two triggering conditions are currently hardcoded to always false.\n\n**Why** This lays groundwork for bridge sessions to shut themselves down after a period of inactivity rather than running indefinitely or being reported as fully completed, though some of the related triggering logic isn't fully wired up yet.\n\n- Area: Elsewhere\n- Names: `CLAUDE_CODE_EXIT_AFTER_STOP_DELAY`\n- Tier: Nothing to try yet\n- Useful: 2\/5\n- Signal: 3\/5"}