Skip to content

fix: clean up temp files after Codex invocations in resolver templates - #470

Closed
HMAKT99 wants to merge 1 commit into
garrytan:mainfrom
HMAKT99:arun/fix-resolver-tempfiles
Closed

HMAKT99 wants to merge 1 commit into
garrytan:mainfrom
HMAKT99:arun/fix-resolver-tempfiles

Conversation

@HMAKT99

@HMAKT99 HMAKT99 commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • 8 mktemp calls in review.ts and design.ts create temp files for Codex prompt/stderr
  • None are cleaned up — accumulate in /tmp/ on every /autoplan, /review, /ship run
  • Fix: rm -f after each cat of the temp file

2 files, 8 cleanup lines added

  • scripts/resolvers/review.ts — 5 temp files
  • scripts/resolvers/design.ts — 3 temp files

Test plan

  • All existing tests pass (2 pre-existing failures on clean main)
  • gen-skill-docs generates all skills correctly
  • Codex output unchanged

8 mktemp calls in review.ts and design.ts create temp files in /tmp/
for Codex prompt and stderr capture, but never clean them up. Over
time these accumulate (~5KB each, per /autoplan or /review run).

Fix: add rm -f after each cat of the temp file. Files cleaned up
immediately after reading, even on error (|| true).
@16francej

Copy link
Copy Markdown
Collaborator

Closing — main already ships an equivalent fix for this. Thanks for the report and patch.

@16francej 16francej closed this Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants