You open the file and you can't figure out what it's doing.
Not because it's complex. Not because it's poorly written. It's actually elegant — concise, well-structured, uses patterns you've never seen in this codebase. You check git blame. It was Sarah. Sarah left eight months ago. Sarah's commit messages are immaculate. Sarah's code is brilliant.
Sarah also did about 80% of her work through AI code generation, and the reasoning behind her decisions lived in prompt conversations that were never saved.
That's the Phantom Intern. It's not bad code — that would be easy. You'd just rewrite it. The Phantom Intern is good code that nobody can explain. Code that works, passes tests, and ships. But the why — why this pattern, why this abstraction, why this trade-off — is gone. It lived in a prompt window that was closed months ago, in a conversation with an AI that has no memory, in the head of someone who now works somewhere else.
The code is an artifact without provenance. A conclusion without an argument.
Here's why this is different from the old knowledge-silo problem. When a developer writes code by hand, the reasoning is embedded in the process — the commits, the false starts, the comments, the conversations over Slack. You can reconstruct the why by reading the history. When a developer generates code through AI, the reasoning lives in a prompt session that is almost never archived. The code tells you what was built. It doesn't tell you why it was built that way.
And the code is often better than what the team would produce on their own. That's the trap. You can't dismiss it as bad code that needs rewriting. It's good code that needs understanding — and understanding code you didn't write, that was generated through a conversation you'll never see, is a particular kind of archaeological challenge.
"Works and nobody understands it" is just "breaks and nobody can fix it" on a delayed timer.
Eventually, you have a team of living developers maintaining code written by a team of ghosts. Everyone routes around the haunted modules the way you'd route around a room where the lights flicker. It works, so you leave it alone. Until it doesn't, and nobody knows why it worked in the first place.
The fix isn't complicated. Save your prompt conversations alongside the code. Require architecture decision records for AI-generated modules. When someone gives notice, treat their codebase knowledge as a perishable asset — schedule knowledge transfer before their last week, not during it. Run regular sessions where developers present modules they didn't write. If nobody can explain a module, flag it before the author leaves.
The Phantom Intern is never malicious. They were productive, collaborative, and genuinely good at what they did. The haunting is just what happens when context walks out the door and nobody thought to write it down first.