🤖 feat: add sticky subagent workspaces#3246
Conversation
|
@codex review |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
@codex review Please take another look now that the PR body formatting is fixed. |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Allow task tool callers to request sticky subagents that remain available after reporting instead of being auto-deleted. Persist the sticky flag on child task workspaces, surface it in task_list, and block non-force parent removal while sticky descendants exist.\n\nCo-authored-by: Mux <noreply@coder.com>
9eff6d6 to
6b65e3f
Compare
|
@codex review Rebased onto latest main; please take another look. |
|
@codex review Rebased on main; please take another look. |
|
Codex Review: Didn't find any major issues. What shall we delve into next? ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Adds an explicit
stickyoption for spawned sub-agent tasks so a user-requested child workspace can remain inspectable after the sub-agent reports instead of being auto-deleted.Background
Sub-agent workspaces normally clean themselves up after
agent_report. Some user workflows need the resulting child workspace to stick around for inspection or follow-up, but that preservation should happen only when the user explicitly asks for it.Implementation
stickyinput guidance to thetasktool and documents that agents must not set it on their own.taskStickyworkspace metadata and surfaces the flag throughtask_list.Validation
bun test src/common/utils/tools/toolDefinitions.test.tsbun test src/node/services/tools/task.test.ts src/node/services/tools/task_list.test.tsbun test src/node/services/taskService.test.ts --test-name-pattern "sticky|preserve subagents until archive|create persists sticky"bun test src/node/services/workspaceService.test.ts --test-name-pattern "sticky completed descendants|preserved completed descendants"make static-checkmake fmtmake fmt-checkmake typecheckmake lintRisks
Low-to-medium regression risk in task cleanup and workspace removal behavior. The change is gated by an explicit sticky flag and includes targeted coverage for non-sticky cleanup, sticky cleanup suppression, task tool plumbing, and parent removal guards.
Generated with
mux• Model:openai:gpt-5.5• Thinking:xhigh• Cost:$0.00