{"version":"2.1.221","anchor":"background-attach-outcomes-are-journaled-to-disk-and-recover","canonical_anchor":"background-attach-outcomes-are-journaled-to-disk-and-recover","heading":"Background-attach outcomes are journaled to disk and recovered later","tier":"internal","area":"Sessions","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.221\/e\/background-attach-outcomes-are-journaled-to-disk-and-recover","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.221","markdown":"### Background-attach outcomes are journaled to disk and recovered later\n\nBackground session attaches now write a small journal file so crashed attaches still report what happened later.\n\n**What**\n\nEvery background attach writes a journal file so an attach that dies with its process still reports an outcome on a later run.\n\n**Details**\n\n- JSON journal under an `attach-journal` directory, created with mode 0700 and files 0600, deleted on completion.\n- Updated as milestones land: marksExpected, daemonBooted, interactiveReached, attachMs, msgsLoaded, msgsInJsonl, msgsRenderedAtFirstPaint.\n- On a later run, orphaned journals whose owning process is gone, or older than 24h (15 min for live pids), are claimed and replayed as synthetic tengu_bg_attach_outcome events carrying `journal_recovered`.\n- Windows rename and unlink contention gets 4 retries; files that still cannot be unlinked are renamed with a `.cleared` suffix.\n\n**Evidence**\n\n`journal_recovered`\n\n- Area: Sessions\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 0\/5"}