[Desktop][Windows] Completed subagent transcripts grow without retention; archiving does not reclaim local disk space

Open 💬 1 comment Opened Aug 26, 2026 by Brazen-joe
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

Codex Desktop on Windows: completed subagent transcripts grow without retention, and archiving does not reclaim local disk space

Summary

Codex Desktop on Windows persisted very large completed subagent transcripts under the local session store. The transcripts had thread_source = subagent in their session_meta records and were independent of the user-started root threads. They accumulated without an apparent retention, compaction, or storage-budget policy.

Archiving those completed subagent threads successfully changed their task state, but did not move or remove their local .jsonl transcripts from the active session store and did not reclaim disk space.

Environment

  • Platform: Windows desktop app
  • Bundled codex CLI reported: codex-cli 0.150.0-alpha.8
  • Storage medium: local C: system drive
  • App build number: not captured before cleanup

Observed impact

  • 514 completed temporary subagent session logs across three local projects occupied 97.78 GB.
  • Individual transcripts were commonly 1-2 GB.
  • The system drive had fallen to only 3.45 GB free before cleanup.
  • The affected files were identifiable by session_meta.payload.thread_source == "subagent"; user-started root threads had thread_source == "user".

Reproduction

  1. Use Codex Desktop on Windows with multi-agent/subagent work enabled.
  2. Start a normal user-root task and have it launch many temporary subagents.
  3. Let the subagents complete and close.
  4. Inspect the local Codex session store. Each completed subagent has an independent .jsonl transcript whose session_meta includes thread_source: "subagent".
  5. Archive those subagent tasks from the Desktop app.
  6. Verify that the tasks are archived in the UI, then inspect the local session store and available disk space.

Actual behavior

  • Completed subagent transcripts can grow to GB scale, primarily from preserved tool calls and command outputs.
  • No visible retention setting, compaction, maximum-size budget, or automatic cleanup occurs for completed subagents.
  • Archiving changes task state but leaves the transcript files in the session store; available disk space does not increase.
  • The user must manually identify logs by internal metadata and delete files to recover space. This is risky and is not an appropriate normal recovery path.

Expected behavior

  • Completed temporary subagents should have a bounded local-storage lifecycle.
  • Codex should compact or prune high-volume tool output for closed subagents, while retaining a concise summary and required parent-thread results.
  • Provide a configurable retention policy (age, total storage budget, or project budget).
  • Provide a clear UI action such as "Archive and remove local transcript" with a size preview and a reversible grace period.
  • Archiving should clearly state whether it is metadata-only; ideally it should offer optional local-data reclamation.
  • The app should warn proactively when Codex local storage crosses a configurable threshold.

Safe workaround used

I retained user-root sessions (thread_source == "user") and only targeted completed subagents (thread_source == "subagent"). I archived them first, then manually deleted the matching transcript files after explicit review. This recovered 97.78 GB, but it permanently removes the ability to open the full child-agent history and should be replaced by a supported product flow.

Privacy

No transcript content, prompts, credentials, project names, or user paths are included in this report.

View original on GitHub ↗

1 Comment

github-actions[bot] contributor · 2 days ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #39469
  • #40371

Powered by Codex Action