Close the Session
Terminal sprawl, context switching, and persistent workloads. A skill that closes the session so the next one picks up cleanly.
If you're using Claude Code daily you've probably already figured out that context management and managing memory across sessions is critical.
The problem I kept hitting was terminal sprawl, new task, new terminal. Makes sense, you want clean context for each thing.
But soon I found I was accumulating terminals, each in a variety of different states. Going back means mentally context switching to figure out where things were left.
What I've found works well is to build a skill that I call to "close" the session.
As sessions reach a reasonable context window (or I've simply reached a natural state of completing what I intended to do) e.g. >200k tokens, I run this "/close" skill.
It does a variety of things such as scanning the context of the chat, and from there decides what memory needs updating, committing to new/modified files to git, and finally appending to a rolling timeline log with pointers to more detailed files (e.g. specifications). It also suggests a "/rename" for the chat so I can more easily find it and come back to it later if needed.
I also have a hook that writes all the existing chat input and output to disk. Every session, every exchange, raw. If I ever need the full conversation, the debugging loops, the exact sequence of what was tried, it's sitting in a file. There is no loss.
But some workflows shouldn't restart every time.
I scan investment signals every morning. I review queued content that requires my attention. These aren't discrete tasks with clean endings. Yesterday's context directly informs today's decisions. Spinning up fresh every morning means re-explaining what setting out to do over again.
For these situations, it makes more sense to compact rather than fully close the session off.
The default compact allows an instruction set and without this instruction you leave it to Claude to decide what to (and not to) keep. So what I've done is enhanced this "/close" skill to also auto-generate the compact instruction.
Key decisions and why. What's unfinished. Critical files to re-read. It explicitly names what's being dropped, so I can scan the list and say "actually, keep that" before it's gone.
With this in hand I now have terminals which are persistent workloads which align to my daily cycles, which is much more effective so I do not need to context switch every time I switch across different terminals.
If anyone else has run into similar problems or has other suggestions worth exploring would love to hear your ideas too to further improve this workflow.