Skip to content

fix(kanban): release scratch workspace and tmux session on task completion (#27369)#28415

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-de55f5dd
May 19, 2026
Merged

fix(kanban): release scratch workspace and tmux session on task completion (#27369)#28415
teknium1 merged 1 commit into
mainfrom
hermes/hermes-de55f5dd

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Salvages #27369 by @LeonJS.

complete_task() now calls _cleanup_workspace() (rmtree scratch dirs only) and _cleanup_worker_tmux() (kill swarm-{assignee} tmux sessions only when pane is dead) after marking a task complete. Both are gated and best-effort so they never block completion or interrupt active work.

PR head was a piggyback on stale browser-provider work; cherry-picked the substantive commit (2159f19cd) directly. Authorship preserved via rebase merge.

…etion

Salvages #27369 by @LeonJS. complete_task() now calls _cleanup_workspace()
and _cleanup_worker_tmux() after marking a task complete.

Scratch workspaces (used by swarm agents) accumulate on disk — hundreds
of MB per task, never released. Stale tmux sessions from completed
agents also persist indefinitely.

Both gates are safe:
- workspace_kind == 'scratch' gate preserves user worktree/dir workspaces
- tmux #{pane_dead} == 1 gate only kills sessions where the worker has
  already exited
- best-effort: cleanup failures never block task completion
@teknium1 teknium1 merged commit 9f008bc into main May 19, 2026
@teknium1 teknium1 deleted the hermes/hermes-de55f5dd branch May 19, 2026 03:45
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins labels May 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-de55f5dd vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 8814 on HEAD, 8814 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 4626 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants