The always-on window grid was placing new session windows at 11 of 11 exact slots, 30px gap per cell, everything snapping into place. Then it started dropping new sessions directly on top of a PowerShell terminal I had open for something unrelated.
The grid tracks slots, not screen contents. Every window it manages gets registered when it’s spawned or adopted: session ID, slot index, bounds. When a new session needs a window, the placement logic asks “which slots are free” by checking that registry, not the actual desktop. A PowerShell window sitting in slot 4 was never registered anywhere, so as far as the grid was concerned, slot 4 was empty. It would hand a brand-new session window that exact rectangle and cover the terminal completely.
I noticed it the obvious way: opened a utility terminal to check something, walked away, came back to a Claude session staring back at me where PowerShell used to be. First pass at a fix, I tried teaching the registry to remember PowerShell specifically, tag it as a known exception on adoption, skip its slot. That held for about a day. Then a Cursor window landed in the same spot and got buried the same way. The registry approach was reactive; every new window type I use was going to keep punching through until I hand-enumerated all of them, which isn’t a fix, it’s a todo list that never closes.
The actual problem was that the grid only knew about its own windows. It needed to know about all windows.
So the real fix, tracked in the ticket that had been open since the first PowerShell incident, was to have the placement pass query live window state before committing a slot, not just consult the registry. Before placing a new or adopted session, it now enumerates actual windows on screen, checks their bounds against each candidate slot, and treats any occupied rectangle as blocked, whether or not that window has a session ID attached. Registered or not, agent or not, if something is sitting there, the slot is unavailable. That flips the model from “track what I own and place around the rest by luck” to “observe what’s actually on screen and place around that.”
Verification was a live dry-run: opened a PowerShell window and a Cursor window in two of the eleven slots, spun up new sessions until the grid ran out of free real estate, and watched it route every new window into the remaining slots without ever touching the two occupied ones. Tests went in alongside that commit to cover the occupied-slot detection directly rather than relying on the dry-run alone.
Same night, closing out that ticket surfaced a second one by accident. I’d asked why /close was still running the full test suite, roughly 6,000 tests, on every pre-close, and that question led to a smarter-test-selection plan filed a couple days earlier. Phase 1 of that plan, a git-mutation-guard hardening pass plus a real test-isolation fix, turned out to already be built. An abandoned session from earlier in the week had written it and left it uncommitted in the tree, just sitting there. I reviewed it, ran it standalone (5/5 passing), confirmed it was already covered by a clean full run of all 6,044 tests, and committed it. Phases 2 through 6, the xdist parallel gate, test tiers, the testmon inner loop, a nightly full run, general hygiene, are still unstarted.
Neither fix was large. But the window grid one is the more useful lesson going forward: when a system’s model of “what’s out there” is scoped to only the things it created, every object outside that scope is invisible to it by construction, not by bug. The registry wasn’t wrong, it was just answering a narrower question than the one placement actually needed to ask.