Dev iconDevNov 30, 2026 ~1 min source read

How to Delete API Keys Your AI Coding Agent Saved on Your Laptop (Claude Code and Codex)

Claude Code saves every session as a plain-text transcript in your home folder for 30 days, and Codex saves a history file by default. If your agent ever read a .env file or printed a key, that key is sitting on your disk. This cleanup takes about 10 minutes and needs no new tools: search those folders, rotate anything

How to Delete API Keys Your AI Coding Agent Saved on Your Laptop (Claude Code and Codex)

Share this story

Send the public story page.

Keep reading in the app

Open the app view to save this story, compare related coverage, and continue from the same source.

Open in app