Most of my day happens in one terminal window. This is how it’s set up.
foot opens straight into tmux
foot is a small, fast terminal for Wayland. Mine opens fullscreen and attaches to a tmux session called main, or creates it if it doesn’t exist:
[main]
initial-window-mode=fullscreen
shell=tmux new-session -A -s main
If I close the terminal, I just open it again and I’m back in the same session, with every window where I left it.
Two lines in tmux give me full colors and the extra keys foot supports:
set -as terminal-features ",foot*:RGB:extkeys"
set -s extended-keys on
tmux: the main things I changed
The changes I use the most:
| Key or setting | What it does |
|---|---|
prefix = Ctrl+a |
easier to reach than Ctrl+b |
Alt+1..9 |
jump to a window without the prefix |
prefix " and prefix % |
split, keeping the same directory |
prefix c |
new window, always in my home directory |
| window name | the directory name of the active pane |
| copy mode | Vim keys, and y copies to the clipboard |
Splits and new windows behave differently on purpose. A split is usually for the task I’m already on, so it opens in the same directory. A new window is usually for something else, so it starts in my home directory.
The layout: one window, up to four sessions
Most of the work happens in one window, split into four areas. Each area has Claude Code in one repo on top, and a shell for the same task below it:
+---------------------------+---------------------------+
| claude (repo A) | claude (repo B) |
| | |
+---------------------------+---------------------------+
| $ kubectl get pod | $ nvim |
+---------------------------+---------------------------+
| claude (repo C) | claude (repo D) |
| | |
+---------------------------+---------------------------+
| $ git diff | $ tofu plan |
+---------------------------+---------------------------+
When Claude finishes, the shell where I check its work is right below it. prefix z makes a pane fullscreen when a plan or a diff doesn’t fit.
I run four only on busy days, with up to three on tasks and one just for questions. On a normal day it’s two.
Neovim runs in those shell panes. On projects where AI tools are allowed, Claude drafts the change, and I review, fix and test it in the editor next to it.
A memory limit as a safety fuse
Every Claude Code session runs with a memory limit set through systemd:
alias claude='systemd-run --user --scope -q -p MemoryHigh=3500M -p MemoryMax=4G -p MemorySwapMax=1G claude'
On my machine, a new session uses about 320 MiB, and one after twenty minutes of work about 480 MiB. The 4 GiB limit is about eight times that, and four sessions at the limit would need more memory than my machine has. The limit isn’t there to split memory between sessions. It’s there in case one session goes wrong: only that session is affected, and tmux, the browser and everything else keep running.
In practice, what limits the number of sessions I run is how much I can review.