[tasks] 🤖 feat: support sticky subagents#3744
Conversation
Add explicit opt-in retention for user-requested sticky subagents. Persist the setting, skip automatic cleanup, and prevent parent lifecycle actions from orphaning retained task workspaces. --- _Generated with `mux` • Model: `openai:gpt-5.6-sol` • Thinking: `max` • Cost: `$56.22`_ <!-- mux-attribution: model=openai:gpt-5.6-sol thinking=max costs=56.22 -->
|
@codex review |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 944d8367cf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
Order forced project workspace cleanup by task depth so sticky descendants are removed before their parents and cannot block the intended project-wide cascade. --- _Generated with `mux` • Model: `openai:gpt-5.6-sol` • Thinking: `max` • Cost: `$84.40`_ <!-- mux-attribution: model=openai:gpt-5.6-sol thinking=max costs=84.40 -->
|
@codex review Addressed the project-deletion finding by removing project workspaces deepest-first, with nested sticky-task regression coverage. Please take another look. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9fec73be09
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
Treat an explicit false value as equivalent to omitting sticky retention when launching a persistent full workspace. --- _Generated with `mux` • Model: `openai:gpt-5.6-sol` • Thinking: `max` • Cost: `$93.96`_ <!-- mux-attribution: model=openai:gpt-5.6-sol thinking=max costs=93.96 -->
|
@codex review Addressed the workspace |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ 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 explicit, user-requested sticky subagents whose child workspaces remain available after reporting instead of being cleaned up automatically.
Background
Subagents are normally transient: once they report and their artifacts are durable, Mux removes their child workspace. Some delegated work needs longer-lived ownership, such as assigning a separate subagent to maintain a PR. That retention must be explicit so ordinary delegation keeps its current cleanup behavior.
Implementation
stickytask argument and instruct agents to use it only when the user explicitly requests persistent subagent ownership.Risks
This touches task, project, and workspace lifecycle code, so the main risk is retaining or removing the wrong child workspace. The new state is opt-in and absent on existing tasks, preserving current behavior by default. Coverage exercises direct and grouped creation, queued persistence, restart/workflow cleanup, nested lineage reduction, task discovery, parent lifecycle guards, and forced project deletion ordering.
Generated with
mux• Model:openai:gpt-5.6-sol• Thinking:max• Cost:$93.96