Skip to content

fix(presets): clean up detached agent processes - #4238

Closed
mikemikimike wants to merge 1 commit into
dstackai:masterfrom
mikemikimike:mikemikimike/fix/preset-detached-helper-cleanup
Closed

fix(presets): clean up detached agent processes#4238
mikemikimike wants to merge 1 commit into
dstackai:masterfrom
mikemikimike:mikemikimike/fix/preset-detached-helper-cleanup

Conversation

@mikemikimike

@mikemikimike mikemikimike commented Sep 1, 2026

Copy link
Copy Markdown

Summary

  • Track descendants launched by the preset agent, including helpers that create a new session.
  • Clean up tracked descendants before terminating the agent and after normal agent completion.
  • Add POSIX regressions for stop-time and normal-exit cleanup of detached helpers.

Fixes #4189

Tests

  • uv run pytest src/tests -q (333 passed, 4874 skipped on Windows)
  • uv run ruff check .
  • uv run ruff format --check .
  • uv run pyright -p .
  • git diff --check

Signed-off-by: mikemikimike <13286568797@163.com>
@r4victor r4victor closed this Sep 1, 2026
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.

[Bug]: dstack preset stop may leave the agent's detached helper processes running

2 participants