Reference remote bridge spawn isolation
As of 2026-05-04, three changes ensure spawned Claude sessions survive a forge-remote-bridge.service restart:
loginctl enable-linger justinwieb— user.slice now survives logout;--user --scopespawns work even after session ends./etc/systemd/system/forge-remote-bridge.service.d/killmode-mixed.conf—KillMode=mixedsosystemctl restartSIGTERMs only the bridge main process, not its whole cgroup (which previously killed all spawned tmux+claude children).forge_spawn_session.sh—tmux new-sessionis now wrapped insystemd-run --user --scope --collect --unit=forge-spawn-<name>, migrating each spawn out of the bridge cgroup intouser.sliceat creation time.
Root cause this fixed: The 2026-05-03 OOM/manual reboot was caused by accumulated spawn memory inside the bridge cgroup; memory-cap.conf was capping the bridge and every spawned claude it owned.
How to apply: When debugging spawn failures or memory cap issues, check that linger is still enabled (loginctl show-user justinwieb | grep Linger) and that the drop-in exists. If a spawned session disappears after a bridge restart, the KillMode drop-in or scope wrap may have regressed.
[auto-memory session b0b9f224-d44d-4259-b67c-1e439fad673d, confidence 0.75, mode staged]