Posts

Codex CLI 401 Unauthorized and Installation Fixes

Image
I recently spent several frustrating hours troubleshooting the Codex CLI on my Mac. It was a classic developer trap: fixing one problem immediately revealed another. Broken symlinks, expired tokens, and directory permissions converged, making it feel as though the tool was simply broken. Since "codex 401 unauthorized" is one of the most searched terms on my blog, it's clear many others are hitting these same walls. I have documented the exact sequence of failures and fixes I encountered on my Mac mini to help you avoid the rabbit hole. Why does codex --version say No such file or directory? When I first installed Codex via Homebrew Cask, the installation appeared successful. However, running codex --version returned No such file or directory . It turned out that while the symbolic link existed, the executable it pointed to was missing. The shell had a map to the binary, but the destination was empty. To fix this, you must restore both the link and the executable vi...

Claude Code: Migrating 15 months of project memory

Symptom: Project memories stored in ~/.claude/projects/ are tied to a specific machine, preventing context sharing across devices. Cause: Memories rely on absolute path slugs for folder names and contain OS-specific filename encoding (CP949). Fix: Use a custom Python script to prune secrets, consolidate memories into one file, and decode filenames during extraction. I've been using Claude Code on my work laptop for 15 months, starting June 17, 2025. Over time, this grew into a massive knowledge base: 46 project folders and 680 automated memory files. These cover everything from internal inventory dashboards and mixing record systems to a desktop PDF editor, alongside my Obsidian second brain. The problem was that all this context lived exclusively in ~/.claude/projects/ on one laptop; my Mac Mini at home was completely clueless about this history. To move this "brain," I wrote a 221-line Python script to package the memories into a zip file. Since the code itself i...