This is a very nice description of the problem. I think the first part of the solution is to not give into the hyper productivity hype: running a gazillion things in parallel. There's likely only a handful of humans that have the mental make-up to survive the permanent context switches. You can train your brain to become better at it, but there's a limit to that, and I found that it will lead to much worse outcomes in terms of output quality of both you and your clanker. I'm no neuroscientist, but I would assume there's a hard limit on how many things your brain can juggle at a time, probably made worse by the complexity that is code.
I generally don't do more than 2-3 things in parallel. I use virtual desktops as "bundle of things that belong to a task", so terminals + editor + browser. Works fine, doesn't need any special OS support, expose on the virtual desktop let's me quickly switch to the task specific app I need.
I also have a little pi extension that shows me what GH issue/PR the clanker session is about, with a link I can click to open the issue/PR in the browser.
Plus 1 virtual desktop for entertainment, so the brain can get some rest. (better alternative: get up and walk a bit every 45 minutes)
Video:
- First desktop: pi session for a PR, extension shows me what PR I work on, can click to open in browser, aux terminal for random BS, editor, browser. Yes, I could split instead of having two terminal windows. I'm old.
- Second desktop: clawdbot pi session, aux terminal for testing, editor, browser
- Third desktop: entertainment booth