Skip to content

fix: remove each task's copy of the terminal environment when it is done - #2111

Open
Douglasymlai wants to merge 3 commits into
mainfrom
fix/terminal-env-cleanup
Open

Douglasymlai wants to merge 3 commits into
mainfrom
fix/terminal-env-cleanup

Conversation

@Douglasymlai

@Douglasymlai Douglasymlai commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request

Related Issue

N/A — maintainer-directed repair; no linked issue required for this PR.

Description

Completed tasks kept separate terminal environments indefinitely. Release Run-owned environment copies after terminal sessions/checkpoints stop, retain interrupted environments for Resume, and rebuild a retained toolkit’s missing environment when needed. Cleanup failure is logged without rewriting the Run outcome.

Session deletion requests a guarded local runtime purge. Background retention runs off the event loop with the plan’s 24-hour TTL (including interrupted copies), 10 GiB soft budget and pressure below 10% free disk. Active runs and symlink/outside-owner paths are protected.

Testing Evidence (REQUIRED)

48 backend tests and 25 frontend tests passed: real filesystem removal, lingering-session refusal, Run-scoped ownership, single-flight cleanup, the actual successful coordinator hook, endpoint active guard, traversal/symlink rejection and retention/pressure behavior. Type-check, focused ESLint/Prettier, Ruff and git diff --check passed. Tests used isolated temporary application storage; no user runtime was deleted. Full paid task/relaunch QA was not run.

Automated checks only; manual app testing is pending.

  • I have included human-verified testing evidence in this PR.
  • This PR includes frontend/UI changes, and I attached screenshot(s) or screen recording(s).
  • No frontend/UI changes in this PR.

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Contribution Guidelines Acknowledgement

@Douglasymlai
Douglasymlai marked this pull request as ready for review October 25, 2026 17:43
@Douglasymlai Douglasymlai self-assigned this Oct 25, 2026

This branch has not been deployed

No deployments
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.

1 participant