<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ojas palorkar</title>
    <description>The latest articles on DEV Community by ojas palorkar (@ojas_palorkar_973c159f6b3).</description>
    <link>https://dev.to/ojas_palorkar_973c159f6b3</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4266504%2Fbf93f9ea-ff23-43c0-8c68-420add90efdd.jpg</url>
      <title>DEV Community: ojas palorkar</title>
      <link>https://dev.to/ojas_palorkar_973c159f6b3</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ojas_palorkar_973c159f6b3"/>
    <language>en</language>
    <item>
      <title>Your AI coding agent saves everything. Here's where it lives.</title>
      <dc:creator>ojas palorkar</dc:creator>
      <pubDate>Sat, 28 Nov 2026 17:16:54 +0000</pubDate>
      <link>https://dev.to/ojas_palorkar_973c159f6b3/your-ai-coding-agent-saves-everything-heres-where-it-lives-f1d</link>
      <guid>https://dev.to/ojas_palorkar_973c159f6b3/your-ai-coding-agent-saves-everything-heres-where-it-lives-f1d</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fggygmy58cjin04xeopoy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fggygmy58cjin04xeopoy.png" alt=" " width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Where Claude Code, Codex and Cursor keep your sessions, what ends up in them, and how to clean them up&lt;/p&gt;

&lt;p&gt;Every prompt you type into an AI coding agent gets written to disk. So does every file it reads, every command it runs and the output it gets back. That's what makes "resume session" work.&lt;/p&gt;

&lt;p&gt;It also means months of your work, and anything sensitive that passed through it, sit in plain-text files in your home folder. I found 26 Codex transcripts on my Mac that I'd forgotten existed.&lt;/p&gt;

&lt;p&gt;Here's where they are, what's in them, and how to keep them under control.&lt;/p&gt;

&lt;p&gt;Where the transcripts live&lt;/p&gt;

&lt;p&gt;Claude Code keeps one folder per project in ~/.claude/projects/, with a .jsonl file for each session.&lt;/p&gt;

&lt;p&gt;Codex CLI keeps sessions in ~/.codex/sessions/, sorted by date, plus your prompt history in ~/.codex/history.jsonl.&lt;/p&gt;

&lt;p&gt;Cursor stores chat history in SQLite files (state.vscdb) under `&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
~/Library/Application Support/Cursor/User/workspaceStorage/ and globalStorage/.&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;br&gt;
`&lt;/p&gt;

&lt;p&gt;Aider writes .aider.chat.history.md and .aider.input.history into the root of each repo you use it in.&lt;/p&gt;

&lt;p&gt;See how much space they take:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;du -sh ~/.claude/projects ~/.codex/sessions "$HOME/Library/Application Support/Cursor/User/workspaceStorage" 2&amp;gt;/dev/null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What's inside them&lt;/p&gt;

&lt;p&gt;A transcript isn't only your prompts. It usually includes:&lt;/p&gt;

&lt;p&gt;anything you pasted, including API keys you shared "just for a second"&lt;br&gt;
the contents of files the agent read; if it opened .env, the values are in the transcript&lt;br&gt;
output of commands it ran, such as env, cloud CLI output or database rows&lt;br&gt;
the diffs of every edit&lt;/p&gt;

&lt;p&gt;It's all readable text. Any process running as your user can read it, and Time Machine backs it up along with the rest of your home folder.&lt;/p&gt;

&lt;p&gt;Check for leaked keys&lt;/p&gt;

&lt;p&gt;This lists the files that contain common key formats without printing the keys to your screen:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;grep -rlE 'sk-ant-|sk-proj-|ghp_|github_pat_|AKIA[0-9A-Z]{16}|xox[bp]-' ~/.claude ~/.codex "$HOME/Library/Application Support/Cursor/User" 2&amp;gt;/dev/null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For a more thorough scan, use gitleaks (version 8.19 or later):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install gitleaks
gitleaks dir ~/.claude
gitleaks dir ~/.codex
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If anything turns up, rotate the key first. Deleting the transcript doesn't remove it from backups or anywhere the file was synced.&lt;/p&gt;

&lt;p&gt;Clean up old sessions&lt;/p&gt;

&lt;p&gt;Claude Code has a retention setting. Add this to ~/.claude/settings.json, and Claude Code deletes sessions inactive for longer than that when it starts (the default is 30 days):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
{
  "cleanupPeriodDays": 14
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Codex CLI: I haven't found a retention setting for Codex sessions, so I prune them by age. List them first, then delete:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find ~/.codex/sessions -type f -name '*.jsonl' -mtime +30 -print
find ~/.codex/sessions -type f -name '*.jsonl' -mtime +30 -delete
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to keep them, archive them before deleting:&lt;/p&gt;

&lt;p&gt;tar czf ~/codex-sessions-backup.tar.gz -C ~/.codex sessions&lt;/p&gt;

&lt;p&gt;Cursor: quit it first. Deleting a project's folder in workspaceStorage clears that project's chat history and UI state; your settings and extensions aren't affected.&lt;/p&gt;

&lt;p&gt;Aider: make sure your chat history was never committed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git ls-files | grep -i aider
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If anything shows up, remove it from the repo and add .aider* to .gitignore.&lt;/p&gt;

&lt;p&gt;Keep secrets out next time&lt;br&gt;
Don't paste keys into prompts. Tell the agent the name of the environment variable instead.&lt;br&gt;
In Claude Code, block reads of secret files in .claude/settings.json:&lt;br&gt;
`&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
{&lt;br&gt;
  "permissions": {&lt;br&gt;
    "deny": ["Read(./.env)", "Read(./.env.*)", "Read(./secrets/**)"]&lt;br&gt;
  }&lt;br&gt;
}&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;br&gt;
`&lt;br&gt;
In Cursor, add .env to a .cursorignore file in the project.&lt;br&gt;
To keep transcripts out of Time Machine as well, run tmutil addexclusion ~/.claude/projects. You won't be able to restore old sessions from a backup after that.&lt;br&gt;
The habit&lt;/p&gt;

&lt;p&gt;Treat ~/.claude and ~/.codex the way you'd treat shell history: useful, but worth checking once a month. Ten minutes of grep is cheaper than a leaked key.&lt;/p&gt;

&lt;p&gt;Disclosure: I build &lt;a href="https://spacewisemac.in/" rel="noopener noreferrer"&gt;SpaceWise&lt;/a&gt;, a Mac and Windows app that, among other things, finds these session folders and scans them offline for keys. Everything above works without it.Where Claude Code, Codex and Cursor keep your sessions, what ends up in them, and how to clean them up&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>claude</category>
      <category>cursor</category>
    </item>
    <item>
      <title>Where your Mac's storage actually goes when you're a developer</title>
      <dc:creator>ojas palorkar</dc:creator>
      <pubDate>Fri, 27 Nov 2026 19:21:19 +0000</pubDate>
      <link>https://dev.to/ojas_palorkar_973c159f6b3/where-your-macs-storage-actually-goes-when-youre-a-developer-3ab1</link>
      <guid>https://dev.to/ojas_palorkar_973c159f6b3/where-your-macs-storage-actually-goes-when-youre-a-developer-3ab1</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi7gp0gj8flq2y6xs0x49.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi7gp0gj8flq2y6xs0x49.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My Mac said 47 GB of "System Data" and gave me no way to see what it was. When I dug in, Xcode alone was using 36.8 GB, and 18 projects I hadn't touched in months were holding 14 GB of node_modules.&lt;/p&gt;

&lt;p&gt;None of it was photos or downloads. It was developer leftovers that macOS doesn't label, and most of it can be rebuilt with one command. Here's where it hides and how to clear it safely.&lt;/p&gt;

&lt;p&gt;First, measure&lt;/p&gt;

&lt;p&gt;Run this in Terminal to see the usual suspects, smallest to largest:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;du -sh ~/Library/Developer/* ~/.npm ~/.cache ~/.gradle ~/.cargo ~/.ollama 2&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null &lt;span class="o"&gt;|&lt;/span&gt; sort -h
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If some folders are missing, give Terminal Full Disk Access in System Settings → Privacy &amp;amp; Security.&lt;/p&gt;

&lt;p&gt;The rule for everything below: delete what can be rebuilt, keep what can't. And quit the related app before deleting its files.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Xcode (often the biggest)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;DerivedData holds build products and indexes. It's safe to delete; Xcode rebuilds it on the next build, which will be slower once.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rm -rf ~/Library/Developer/Xcode/DerivedData/*

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Unavailable simulators are devices for runtimes you no longer have:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;xcrun simctl delete unavailable

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Simulator runtimes are several GB each. List them, then delete the iOS versions you don't test on:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;xcrun simctl runtime list
xcrun simctl runtime delete &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;runtime-identifier&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also do this in Xcode → Settings → Components (called Platforms in older versions).&lt;/p&gt;

&lt;p&gt;iOS DeviceSupport (~/Library/Developer/Xcode/iOS DeviceSupport) has a folder per iOS version you've connected a device with. Old versions are safe to delete; Xcode copies them again when that device reconnects.&lt;/p&gt;

&lt;p&gt;Archives (~/Library/Developer/Xcode/Archives): be careful. They contain the dSYMs you need to read crash reports from builds you shipped. Only delete archives for builds that are no longer in users' hands.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Docker&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;See what Docker is using:&lt;/p&gt;

&lt;p&gt;docker system df&lt;/p&gt;

&lt;p&gt;Then clean up in order of risk:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker builder prune        # build cache: safe&lt;br&gt;
docker image prune -a       # images not used by any container&lt;br&gt;
docker container prune      # stopped containers&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
docker system prune -a --volumes does all of this and also deletes unused volumes. That includes local database data, so only run it if you know what's in your volumes.&lt;/p&gt;

&lt;p&gt;Why Docker.raw looks huge: Docker Desktop's disk image is a sparse file. Finder and ls show its maximum size; du shows what it really uses:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;
ls -lh ~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw
du -h  ~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After pruning, Docker hands the freed space back to macOS, though it can take a few minutes. You can also lower the limit in Docker Desktop → Settings → Resources.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;node_modules in old projects&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;List every node_modules under your projects folder by size (change ~/code to wherever yours are):&lt;/p&gt;

&lt;p&gt;&lt;code&gt;find ~/code -name node_modules -type d -prune -exec du -sh {} + | sort -h&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For an interactive version, npx npkill lets you browse and delete them.&lt;/p&gt;

&lt;p&gt;It's safe for any project with a lockfile: npm ci (or pnpm install, yarn) brings it back exactly. The same goes for .next, dist, build and Rust's target/ (cargo clean) in projects you're not working on.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Package manager caches&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Every tool keeps its own download cache, and all of these re-download on demand. Medium has no tables, so this goes in one code block:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm        npm cache clean --force&lt;br&gt;
pnpm       pnpm store prune&lt;br&gt;
Yarn v1    yarn cache clean&lt;br&gt;
Yarn v2+   yarn cache clean --all&lt;br&gt;
Bun        bun pm cache rm&lt;br&gt;
Homebrew   brew cleanup --prune=all&lt;br&gt;
pip        pip cache purge&lt;br&gt;
uv         uv cache clean&lt;br&gt;
conda      conda clean --all&lt;br&gt;
Gradle     rm -rf ~/.gradle/caches&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Local AI models&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A single model is anywhere from 4 GB to 40+ GB, and it's easy to forget which ones you tried.&lt;/p&gt;

&lt;p&gt;Ollama keeps models in ~/.ollama/models:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama list
ollama rm &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;model-name&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hugging Face caches downloads in ~/.cache/huggingface/hub:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;huggingface-cli scan-cache
huggingface-cli delete-cache
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Newer versions of the CLI are called hf.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Editors and AI coding agents&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;VS Code and Cursor keep per-project state in workspaceStorage, which grows with every folder you've ever opened:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/Library/Application Support/Code/User/workspaceStorage
~/Library/Application Support/Cursor/User/workspaceStorage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Quit the editor first. Deleting these resets per-project UI state, not your settings or extensions.&lt;/p&gt;

&lt;p&gt;AI coding agents save full transcripts. Claude Code keeps them in ~/.claude/projects and removes old sessions after cleanupPeriodDays (30 by default). Codex CLI keeps them in ~/.codex/sessions.&lt;/p&gt;

&lt;p&gt;Before deleting these, it's worth searching them for API keys you've pasted into a session. They're plain text, and they sit in your home folder.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Time Machine local snapshots
tmutil listlocalsnapshots /&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;macOS removes these on its own when it needs the space, so you usually don't need to touch them. If an installer refuses to run, sudo tmutil deletelocalsnapshots  removes one.&lt;/p&gt;

&lt;p&gt;What I'd do first&lt;br&gt;
DerivedData and unavailable simulators.&lt;br&gt;
docker builder prune.&lt;br&gt;
node_modules in projects you haven't opened in a month.&lt;br&gt;
brew cleanup --prune=all and your package manager's cache.&lt;/p&gt;

&lt;p&gt;For me, that alone got back most of the 47 GB.&lt;/p&gt;

&lt;p&gt;Disclosure: I build &lt;a href="https://spacewisemac.in/" rel="noopener noreferrer"&gt;SpaceWise&lt;/a&gt;, a Mac and Windows app that finds these folders and checks lockfiles and git activity before cleaning. Everything above works without it.&lt;/p&gt;

</description>
      <category>development</category>
      <category>docker</category>
      <category>ai</category>
      <category>software</category>
    </item>
  </channel>
</rss>
