We Fixed the Same White Screen Three Times
(And Then Built a Prompt to Prevent It)
There’s a particular kind of embarrassment that comes from realising you’ve solved the same problem three times in ten days. It deepens considerably when you’re the one who told the AI what was wrong every single time.
This is that story.
The Setup
In late January 2026, Sugartown migrated from a WordPress/Python pipeline into a proper React + Sanity monorepo. Two legacy repos were subtree-imported into a single pnpm workspace. The history was preserved. The architecture was modern. The vibes were immaculate.
And then the header and footer kept disappearing.
Three Fixes, Ten Days, One Bug
The root cause was mundane: during the migration, Header.jsx and Footer.jsx were half-migrated to a new siteSettings query pattern but still referenced the old variable names from the legacy queries. React threw a ReferenceError. The render tree died. White screen.
Simple. Obvious. In retrospect.
Three sessions. Three fixes. One bug. Zero cross-session awareness.
Why This Keeps Happening
Claude Code is, genuinely, astonishingly capable. It can read a codebase, trace a bug through component trees and query layers, write correct fixes, maintain architectural consistency across a complex multi-stage migration, and produce release documentation that a senior engineer would be proud of.
What it cannot do is remember that it fixed this last Tuesday.
Each session starts fresh. There is no ambient awareness of “oh, I saw something like this before.” The context window is wide but it is also bounded and it begins at zero every morning. The irony is that everything needed to catch this was present the whole time — in the git log, in the branch names, in the commit messages. The fix on objective-newton even had a clear commit message: “fix undefined variable crashes in Header and Footer.” It just wasn’t being looked at.
This is not a criticism. It is a constraint. An important one to name.
The PM Who Kept Noticing
Here is the part that deserves its own section.
Throughout this process, the human — a self-described lay person, a Product Manager who “who does code circa 2008” — kept being the one to surface the pattern.
“Isn’t this the same white screen issue from before?” “Didn’t we fix the header already?” “This feels familiar.” “Claude, you so pretty.”
This is not a small thing. The PM was functioning as the cross-session memory that the AI lacked. Not by reading commit hashes, but by holding the shape of the problem in their head over time. Pattern recognition across context boundaries. The thing that doesn’t reset between sessions.
The PM kept handing the AI the thread it had dropped. The AI kept being surprised to find it. This dynamic — the lay person as connective tissue between AI sessions — is worth naming explicitly, because it is almost certainly more common than anyone admits. And almost never credited.
What We Did About It
The response to discovering Fix #3 was to build a morning housekeeping prompt: a structured git audit that runs at the start of every Claude Code session and produces a plain-English briefing before any new work begins.
It checks branch states, uncommitted files, unmerged work hiding on orphaned remotes, and forgotten stashes. It delivers recommendations in plain English, one action at a time, with a confirmation required before anything is executed.
It is, in essence, a prompt that compensates for the absence of cross-session memory by making the first act of each session an honest audit of what the last session left behind.
What This Still Doesn’t Solve
The housekeeping prompt would have caught objective-newton on day two. But it only works if it’s run. And it only works if the output is read. And it only works if the human reviewing the briefing has enough context to recognise that “three branches touched Footer.jsx this week” is a signal worth investigating.
The honest version of this story:
AI is very good at executing within a session AI has no memory between sessions by default Documentation and git hygiene are the prosthetic memory The human is the archivist
Recommendations
Run the morning housekeeping prompt. Every session. Not when you remember to.
Merge or close branches within 48 hours. An unmerged branch is a question mark that compounds. objective-newton would have been harmless if closed the day it was created.
Name your branches. Auto-generated names (distracted-hoover, upbeat-galileo, objective-newton) are charming but carry zero semantic information. A branch named fix/header-footer-white-screen gets noticed. A branch named objective-newton gets forgotten.
One canonical fix, one place. A fix that doesn’t reach main before the next session starts doesn’t exist as far as the next session is concerned.
Tell the AI what you remember. “I feel like we fixed something like this before” is a valid and high-value input. The AI will go look. This is not cheating. This is correct use of the tool.
Write it down. The MEMORY.md in this project exists for exactly this reason — persistent facts that survive context resets. Bug patterns, gotchas, fixed issues. Not because the AI will remember, but because the file will.
Coda
We built a governance prompt to fix a governance problem that was itself caused by not having governance. This is either very on-brand for software development, or a perfect illustration of why process exists.
The header is rendering correctly now.
All three times.