{"version":"2.1.257","anchor":"prompt-draft-now-persisted-to-disk-for-background-sessions","canonical_anchor":"background-sessions-persist-unsent-prompt-drafts-across-rest","heading":"Background sessions persist unsent prompt drafts to .prompt-stash","tier":"notice","area":"Sessions","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.257\/e\/prompt-draft-now-persisted-to-disk-for-background-sessions","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.257","markdown":"### Background sessions persist unsent prompt drafts to .prompt-stash\n\nAn unsent prompt draft in a background session is saved to disk and restored on reconnect, cursor position and all.\n\nBackground sessions now write the in-progress, unsent prompt text (composer text, cursor offset, pasted-content ids, launch-warning state) to a `.prompt-stash` file under the job directory, validated against a schema and written atomically. A new class subscribes to the prompt-input store's `stash` field and persists it, and on connection the reverse-proxy server's `onConnection` now calls `promptStash.restore()` unconditionally, in addition to the existing `restorePromptDraft`, so a background session recovers an in-progress but unsent prompt after a restart or reattach. Stash size is capped, falling back to memory-only with a warning if the draft is too large to persist.\n\n- Area: Sessions\n- Tier: You'll notice\n- Useful: 4\/5\n- Signal: 4\/5"}