Repository navigation
Use persistent session dirs for agent workspaces (closes #1198) - #1235
Conversation
Replace tempfile::TempDir with a named directory at ~/.nodespace/agent-sessions/<uuid>/ so agent artifacts, context files, and output survive session end and daemon restarts. Co-Authored-By: Claude <[email protected]>
Code Review — PR #1235 (Issue #1198)Review Type: Initial Review Requirements Check
All acceptance criteria met. Code Review FindingsSuggested Improvements
These two comments were not updated as part of this PR. They describe the old
Same issue: this sentence now describes behavior that no longer happens. Should read: "The session directory at
The NitpicksNit: The wording is accurate (it's under Nit:
Nit: The field changed from Overall AssessmentThis is a correct, focused, net-positive change. The core replacement —
The only real gap is two stale doc comments in Recommendation: REQUEST CHANGES — fix the two stale doc comments in |
malibio
left a comment
There was a problem hiding this comment.
Fix two stale doc comments in manager.rs (lines 75 and 105) that still describe the old temp-dir Drop-based cleanup, and the stale 'Temp-dir cleanup happens when the last Arc is dropped' sentence in session.rs terminate() doc (lines 302-303). All three are one-liner text fixes — no logic change needed. Everything else is clean and the implementation is correct.
Three doc comment locations still described the old Drop-based temp dir cleanup behavior. Updated to accurately reflect that session directories persist at ~/.nodespace/agent-sessions/<uuid>/ after both process exit and session drop. - manager.rs auto-prune comment: clarified map-entry removal vs dir deletion - manager.rs terminate() doc: same correction - session.rs terminate() doc: same correction Skipped: pub->pub(crate) for session_dir (field is intentionally public; external callers legitimately need the artifact path). launch_for_test duplication filed as follow-up per reviewer suggestion. Co-Authored-By: Claude <[email protected]>
Address-Review Summary✅ Addressed (3 findings)🟡 Two stale comments in 🟡 Stale ⏭️ Skipped (2 suggestions)🟢 🟢 |
* Use persistent session dirs for agent workspaces (closes #1198) Replace tempfile::TempDir with a named directory at ~/.nodespace/agent-sessions/<uuid>/ so agent artifacts, context files, and output survive session end and daemon restarts. Co-Authored-By: Claude <[email protected]> * Address review: fix stale temp-dir doc comments Three doc comment locations still described the old Drop-based temp dir cleanup behavior. Updated to accurately reflect that session directories persist at ~/.nodespace/agent-sessions/<uuid>/ after both process exit and session drop. - manager.rs auto-prune comment: clarified map-entry removal vs dir deletion - manager.rs terminate() doc: same correction - session.rs terminate() doc: same correction Skipped: pub->pub(crate) for session_dir (field is intentionally public; external callers legitimately need the artifact path). launch_for_test duplication filed as follow-up per reviewer suggestion. Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Michael Libio <[email protected]> Co-authored-by: Claude <[email protected]>
Summary
tempfile::TempDirwith a named directory at~/.nodespace/agent-sessions/<uuid>/so agent artifacts survive session end and daemon restartsPtySession::launchand used as the directory name, tying filesystem path directly to the session recordtempfilefrompackages/agentproduction dependencies (retained indev-dependenciesfor existing tests in that package)launch_for_testusesstd::env::temp_dir()/nodespace-agent-test-sessions/<uuid>/to avoid polluting~/.nodespaceduring CITest plan
cargo build --workspacecompiles cleanlybun run test:allpasses with no new failuressession_dir_persists_after_process_exit_and_session_droptest verifies the directory outlives both process exit and session dropCloses #1198
🤖 Generated with Claude Code