openai / openai/codex

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

Open
#40,803 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug performance subagent windows-os
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the local session store handling for session_meta records and archived .jsonl transcripts, focusing on completed subagents identified by thread_source == "subagent". Done should include a bounded storage lifecycle, a supported reclamation path, and clear behavior or warnings for archived local transcripts.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.