-
Notifications
You must be signed in to change notification settings - Fork 34
Description
Bug
When porch runs consultations via background tasks, the output files are written to temp paths that Claude Code aggressively cleans up during the same session. By the time porch tries to read the consultation results, the files are gone.
Root Cause
Claude Code manages background task output files in temp directories and cleans them up aggressively. Porch uses --output pointing to these temp paths, and the files get deleted before they can be consumed.
Fix
Porch should write consultation output to a persistent location in the project filesystem rather than relying on temp paths. The natural location is:
codev/projects/<id>-<name>/<id>-<phase>-iter<N>-<model>.txt
This is within the builder's worktree but on the actual filesystem, not in a temp directory. The files survive the session.
Separate Question (Not This Issue)
Whether these files should be attached to the PR, checked into the codebase, or handled some other way for long-term preservation is a separate design decision.