#Durable receipts
Every session leaves a permanent record of what it did — so closing the window, walking away, or restarting your machine never erases the work.
#Overview
A Shell session does real work: it runs commands, builds and tests, operates tools, and streams its output back to you live. That work has a history worth keeping. A durable receipt is the lasting record of everything a session did — what ran, what happened, and what it produced — held safely so it survives anything that would normally interrupt you.
This is what lets you treat a session as a place you can leave and return to rather than a moment you have to babysit. If you close the window mid-task, your machine restarts, or you simply come back hours later, the session's history and result are still there. You return and see exactly what happened, in order, just as it ran.
#What you can do
With durable receipts, you can:
- Leave and come back. Close the Shell window and reopen it later; the session's history is intact.
- Survive a restart. If your machine restarts, the receipt of what a session did is not lost.
- Review exactly what happened. Read back the full record of a session — the commands and their live output — after the fact.
- Trust a finished job. A completed session keeps its result, so you can confirm the outcome whenever you check.
- Keep a clean record after closing. When you close a session, its durable receipt remains available even though the session itself has ended.
- Step away from long work. Start a long job, do other things, and rely on the receipt being there when you return — paired with notifications that tell you when the job finishes.
A durable receipt is a record of a session, not a live connection to it. If a session is still running and you want to watch its output stream again, re-attach to it; if it has already finished or you have closed it, the receipt is how you review what happened.
#How to use it
You do not have to switch anything on — every session keeps a durable receipt by default. Here is how to make use of it:
- Do your work in a session. Run commands, build, test, or operate tools. As it runs, output streams to you live and is recorded.
- Step away whenever you need to. Close the window, switch surfaces, or let your machine restart. The session's history and state are preserved.
- Come back and reopen the Shell. Return to the session to find its history exactly where it was.
- Review what ran. Read back the recorded output to see precisely what happened, in order — useful for confirming a result or understanding a failure.
- Close the session when you are done. Closing is a clean stop, and the durable receipt of what the session did stays available for later review.
For a long-running job, combine durable receipts with running in the background. Start the job, let it keep going on its own, step away, and let a notification tell you when it finishes. When you return, the receipt shows you the whole run.
#Examples
What you ask:
Run the full build, then run the test suite. I'm stepping out.What you see: The build and tests start and stream their output into the session. You close the window and leave. When you reopen the Shell later, the session is there with its complete history — every line that ran while you were away — and the final result waiting for you to read.
What you ask: You start a long job in a session, then your machine restarts unexpectedly before it finishes.
What you see: After the restart, you reopen the Shell and find the session's durable receipt intact. You can see exactly what ran up to that point and what the session produced — nothing about the work you already did is lost.
What you ask: A session finished hours ago and you want to confirm what it actually did.
What you see: You open the session and read back its recorded output from start to finish — the commands and their live results — and confirm the outcome with certainty, long after the work completed.
#Tips
- Treat sessions as durable, not disposable. Because the receipt always survives, you can confidently close the window on a running job instead of keeping it open just to babysit it.
- Review the receipt to troubleshoot. If something did not behave as expected, the recorded output is the most reliable place to see what actually happened — better than memory or guessing.
- Use session context for a quick look back. Within a running session, the built-in
contextcommand shows you recent context; the durable receipt is the full, lasting record behind it. - Closing keeps the record. Don't avoid closing a finished session to "save" its history — the receipt remains after you close it, so closing is clean and safe.