Skip to content

fix(shell): clean up session temporary files - #107

Merged
knight22-21 merged 1 commit into
knight22-21:mainfrom
Saksham1105:fix/shell-session-temp-cleanup
Oct 22, 2026
Merged

knight22-21 merged 1 commit into
knight22-21:mainfrom
Saksham1105:fix/shell-session-temp-cleanup

Conversation

@Saksham1105

Copy link
Copy Markdown
Contributor

Summary

  • Add safe, idempotent cleanup for \ShellSession\ temporary directory and output files
  • Implement context-manager support (_enter_\ / _exit_) on \ShellSession\
  • Register process-exit cleanup via \�texit.register(session.cleanup)\ in
    egister_shell_tool\
  • Add comprehensive regression tests in \ ests/test_shell_tool.py\

Testing

  • Focused test suite: .venv\Scripts\python.exe -m pytest tests/test_shell_tool.py\ (21 passed)
  • Full test suite: .venv\Scripts\python.exe -m pytest tests/\ (847 passed, 2 skipped)
  • Ruff lint check: .venv\Scripts\ruff check devagent/ tests/\ (All checks passed!)

Closes #99

@knight22-21
knight22-21 merged commit 866d3b2 into knight22-21:main Oct 22, 2026
5 checks passed
@knight22-21

Copy link
Copy Markdown
Owner

Thanks for the fix, @Saksham1105! Ensuring temporary directories created by \ShellSession\ are cleaned up on session exit prevents orphaned temp files from accumulating on disk.

If you find DevAgent useful, a ⭐ on the repo would mean a lot — no pressure though!

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.

ShellSession leaks temporary directories in tempfile without cleanup on exit

2 participants