Skip to content

🤖 feat: simplify persistent sub-agent lifecycle - #3825

Open
ammar-agent wants to merge 18 commits into
mainfrom
feat/persistent-subagent-experience
Open

🤖 feat: simplify persistent sub-agent lifecycle#3825
ammar-agent wants to merge 18 commits into
mainfrom
feat/persistent-subagent-experience

Conversation

@ammar-agent

@ammar-agent ammar-agent commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Makes sub-agents durable, reusable child workspaces with one consistent public lifecycle:

active → inactive → removed

A report or task_stop makes a child inactive without deleting its workspace. task_send_message steers active work or reawakens an inactive child under the same stable task ID and workspace context. task_retitle updates its short, friendly reusable role name. task_remove is the only irreversible cleanup operation.

The left sidebar now shows sub-agents only while they are active; the chat transcript's sub-agent decoration is the canonical persistent hierarchy and remains available for inactive children.

Background

The previous task API mixed execution state with workspace retention:

  • task_terminate destructively removed active sub-agents;
  • task_workspace_lifecycle exposed archive/unarchive/worktree concepts;
  • sticky and preserveSubagentsUntilArchive created multiple retention classes;
  • completed children required a different operation to continue;
  • task-like workspace titles became stale when a persistent child received new assignments;
  • inactive children could accumulate without prompting the parent to retain or remove them deliberately;
  • stopping useful work merely to reconcile a turn marked the child interrupted rather than completed.

The new contract treats every user-owned sub-agent as a persistent specialist with a stable public identity and a parent-managed lifecycle.

Implementation

Uniform child identity and continuation recovery

  • Keeps one stable public task ID equal to the child workspace ID.
  • Persists completed/stopped user-owned children until explicit removal.
  • Keeps internal wst_* continuation handles private.
  • Routes list/await/send operations through the stable child identity, including nested children whose direct parent owns the continuation record.
  • Validates canonical ISO timestamps while recovering the newest continuation after crashes.
  • Replays a stopped queued child's preserved initial brief when its first continuation starts.
  • Mirrors only the terminal settlement that actually wins concurrency races.

Public task operations

  • task_stop — cancels active work non-destructively and leaves unfinished children interrupted. Parent guidance now distinguishes cancellation from asking useful work to finalize normally.
  • task_send_message — steers queued/running work or reawakens an inactive child in the same workspace, preserving the child's current model/thinking settings.
  • task_retitle — changes a persistent child’s friendly role label, such as Reviewer or Simplicity Auditor, without changing stable identity or filesystem paths.
  • task_remove — irreversibly deletes inactive child workspaces, rejects active children, and removes nested children deepest-first.
  • task_list — keeps private continuation handles hidden and adds event-driven housekeeping guidance when it encounters inactive user-owned children.
  • Removes task_workspace_lifecycle and task_terminate from the advertised/executable toolset while retaining compatibility renderers for historical transcripts.

Lifecycle, cleanup, and concurrency

  • Parents reconcile active descendants before finishing a turn.
  • After consuming a terminal report, parents decide whether to retain a reusable specialist or remove a one-shot/obsolete child.
  • Before completing a large task or PR, parents are guided to list reported/interrupted children and clean up stale ones deepest-first.
  • Compaction/restart recovery rediscovers inactive children without deleting them automatically.
  • Initial creation, reawakening, archive, and direct removal share a task-tree lifecycle lock so ancestors cannot disappear while child work starts.
  • Reawakened children count once toward parallel quotas rather than once as a child and again as a continuation.
  • Explicit stops supersede pending terminal wake-ups; intentional background work retains one-shot terminal attention.

Naming and UI

  • Parent/system/tool guidance requests short, friendly reusable role names instead of ordinary task-summary chat titles.
  • Adds a task_retitle transcript card, tool icon, schema/bridge registration, Storybook state, and shared-transcript output preservation.
  • task_list cards render inactive-child cleanup guidance.
  • Inactive/reported/interrupted child rows disappear from the left sidebar automatically, including terminal workflow members and selected inactive children.
  • Active and reawakened children remain visible; live sidebar activity covers temporarily stale metadata.
  • The transcript sub-agent decoration remains the canonical nested hierarchy for persistent children and reports terminal continuation outcomes accurately.

Retention compatibility and simplification

  • Removes sticky from task inputs, listing, and runtime behavior while retaining inert legacy fields for downgrade compatibility.
  • Keeps the legacy preserveSubagentsUntilArchive field canonicalized to true for older builds but removes it from runtime/UI decisions.
  • Workflow-owned workers remain transient because their workflow journal owns durable output.
  • Centralizes active workspace-turn status checks, continuation lookup, and WorkspaceService lifecycle-lock dispatch, reducing duplicated lifecycle branching.

Validation

  • make static-check
  • make typecheck
  • Full TaskService and WorkspaceService suites
  • Task create/await/list/send/retitle/stop/remove suites
  • Tool schema, bridge, built-in agent policy, system-prompt, and transcript-sharing suites
  • Task tool UI/registry/story tests
  • Project sidebar, sidebar grouping/filtering, AgentListItem, and sub-agent decoration suites
  • Focused simplification validation: 713 lifecycle tests passed

Risks

  • Downgrades: older builds still interpret retained compatibility fields with previous archive-oriented behavior.
  • Internal executions: stable-child routing must remain synchronized with private continuation records.
  • Removal: task_remove is intentionally irreversible, though parent transcript/report evidence may remain.
  • Sidebar discoverability: inactive children intentionally leave the sidebar; users access them through the canonical transcript decoration.
  • Intentional wakes: parents may still receive later updates from deliberately retained active background work.

Generated with mux • Model: openai:gpt-5.6-sol • Thinking: xhigh • Cost: $991.94

@mintlify

mintlify Bot commented Aug 9, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Mux 🟢 Ready View Preview Aug 9, 2026, 9:02 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the persistent sub-agent lifecycle, parent-scoped cleanup, and chat decoration experience.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 140059526d

ℹ️ 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".

Comment thread src/common/types/tasks.ts
@ammar-agent
ammar-agent force-pushed the feat/persistent-subagent-experience branch from 1400595 to 56c3bba Compare August 9, 2026 21:11
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

Addressed the Codex P1 downgrade concern: config load now migrates both missing and legacy preserveSubagentsUntilArchive: false values to persisted true through the serialized migration queue before task startup. Added coverage for both on-disk forms and re-ran make static-check.

@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Please re-review the downgrade-safe persistence migration and the complete updated diff.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 56c3bbac19

ℹ️ 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".

@ammar-agent
ammar-agent force-pushed the feat/persistent-subagent-experience branch 2 times, most recently from d082dc4 to fab594e Compare August 9, 2026 21:43
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the one-time retention migration marker, restored opt-out compatibility, workspace-turn ownership check, and complete updated diff at the latest commit.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: fab594e5f3

ℹ️ 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".

@ammar-agent
ammar-agent force-pushed the feat/persistent-subagent-experience branch from fab594e to ec23165 Compare August 9, 2026 21:49
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the final parent-facing lifecycle contract in the system prompt, task/list/terminate/lifecycle tool descriptions, and deep-review skill alongside the implementation.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ec231657e3

ℹ️ 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".

Comment thread src/node/services/systemMessage.ts Outdated
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

Addressed the sticky lifecycle mismatch: parent/system/tool/schema guidance now states that an unarchived sticky child blocks ancestor archive and must receive its own archive/remove action first. This matches the existing preflightArchive/archive guard. Re-ran system-message, tool-definition, sticky lifecycle, and static checks.

@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Please re-review the corrected sticky lifecycle contract and complete latest diff.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dd5c583375

ℹ️ 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".

Comment thread src/node/services/taskService.ts
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

Addressed the descendant-orphaning P1: removeOwnedTaskWorkspace now refuses removal while any descendant sub-agent workspace remains, reports the blocking descendant IDs, and the parent/system/tool guidance directs nested removals deepest-first. Added a regression proving parent removal is blocked until child then parent are removed. Static checks and focused lifecycle tests pass.

@ammar-agent
ammar-agent force-pushed the feat/persistent-subagent-experience branch from dd5c583 to a8726bc Compare August 9, 2026 22:06
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Please re-review descendant-safe lifecycle removal and the complete latest diff.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a8726bcd55

ℹ️ 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".

Comment thread src/common/types/tasks.ts
Comment thread src/node/services/tools/task_workspace_lifecycle.ts Outdated
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

Addressed both latest lifecycle findings:

  • direct WorkspaceService.remove(..., force: true) and retention opt-out paths now refuse removal whenever any descendant sub-agent workspace remains, so archived-workspace UI deletion cannot orphan the tree
  • task_workspace_lifecycle now executes targets sequentially in caller order, so a deepest-first nested remove batch deterministically removes child then parent

Added direct-force, retention-opt-out, service lifecycle, and sequential batch regressions. Focused tests, typecheck, and make static-check pass.

@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Updated the stale unit test for the removed sticky input in f137788; the task tool suite and make static-check pass locally. The prior Unit CI failure was a Bun 1.3.5 crash in isolated WorkflowRunner.test.ts before the main unit suite began.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f13778824b

ℹ️ 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".

Comment thread src/node/services/taskService.ts Outdated
Comment thread src/node/services/taskService.ts Outdated
Run direct workspace removal under the task-tree lifecycle lock while preserving the already-locked sub-agent removal path.

---

_Generated with `mux` • Model: `openai:gpt-5.6-sol` • Thinking: `xhigh` • Cost: `$706.94`_

<!-- mux-attribution: model=openai:gpt-5.6-sol thinking=xhigh costs=706.94 -->
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Addressed direct ancestor removal versus child creation serialization in 9e90bb9. Full TaskService, WorkspaceService, task tool suites and make static-check pass locally.

Count reawakened children only through their continuation handles and use each active child workspace current model, thinking, and reasoning settings for guidance.

---

_Generated with `mux` • Model: `openai:gpt-5.6-sol` • Thinking: `xhigh` • Cost: `$706.94`_

<!-- mux-attribution: model=openai:gpt-5.6-sol thinking=xhigh costs=706.94 -->

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9e90bb926a

ℹ️ 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".

Comment thread src/node/services/taskService.ts
Comment thread src/node/services/taskService.ts Outdated
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Addressed reawakened-child quota double-counting and active-guidance current settings in d0377ce. Full TaskService, WorkspaceService, task tool suites and make static-check pass locally.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

await this.enqueueTerminalAttention({
ownerWorkspaceId: record.ownerWorkspaceId,
sourceKind: "workspace_turn",
terminalOutcome: terminalAttentionOutcome(record.status),
sourceId: record.handleId,

P1 Badge Contain terminal-attention recovery failures

When one terminal handle belongs to a session whose attention store is unwritable, enqueueTerminalAttention() rejects, and initialize() awaits this recovery method without any surrounding containment, so that single damaged session prevents the application from starting. Fresh evidence beyond the earlier reconciliation finding is that the later terminal-attention recovery pass remains unguarded; isolate failures per record or catch and log the recovery pass.

AGENTS.md reference: AGENTS.md:L107-L112

ℹ️ 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".

Preserve the original queued assignment through first continuation acceptance and ignore malformed handle timestamps during startup reconciliation.

---

_Generated with `mux` • Model: `openai:gpt-5.6-sol` • Thinking: `xhigh` • Cost: `$706.94`_

<!-- mux-attribution: model=openai:gpt-5.6-sol thinking=xhigh costs=706.94 -->
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Addressed preserved queued-brief replay/cleanup and malformed continuation timestamp recovery in 54364ef. Full TaskService suite and make static-check pass locally; the broader WorkspaceService/task tool suites passed before the final lint-only adjustment.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 54364efee0

ℹ️ 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".

Comment thread src/node/services/taskService.ts Outdated
Ignore parseable but non-ISO handle timestamps so corrupted records cannot outrank active continuation state during startup recovery.

---

_Generated with `mux` • Model: `openai:gpt-5.6-sol` • Thinking: `xhigh` • Cost: `$706.94`_

<!-- mux-attribution: model=openai:gpt-5.6-sol thinking=xhigh costs=706.94 -->
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Addressed strict canonical ISO validation for continuation timestamps in 55f5a5c. The timestamp regression, full TaskService suite, and make static-check pass locally.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 55f5a5c159

ℹ️ 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".

Centralize active workspace-turn status checks, remove lifecycle tool casts, and share task-tree lock coordination without changing public behavior.
Add task_retitle, event-driven stale-child cleanup guidance, finalization-aware stopping policy, friendly role naming, and hide inactive child workspaces from the left sidebar in favor of the transcript decoration.

---

_Generated with `mux` • Model: `openai:gpt-5.6-sol` • Thinking: `xhigh` • Cost: `$824.74`_

<!-- mux-attribution: model=openai:gpt-5.6-sol thinking=xhigh costs=824.74 -->
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Added persistent-child retitling, friendly role-name steering, event-driven inactive-child cleanup guidance, finalization-aware stop policy, and automatic removal of inactive sub-agent rows from the left sidebar. Also integrated a validated lifecycle simplification. Comprehensive targeted suites and make static-check pass locally.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f27b6f5eb7

ℹ️ 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".

Comment thread src/browser/utils/ui/workspaceFiltering.ts Outdated
Comment thread src/common/utils/tools/toolDefinitions.ts Outdated
Keep nested active children visible through inactive persistent parents, scope friendly role naming to sub-agents, and update integration and Storybook contracts for the transcript-canonical inactive hierarchy.

---

_Generated with `mux` • Model: `openai:gpt-5.6-sol` • Thinking: `xhigh` • Cost: `$919.75`_

<!-- mux-attribution: model=openai:gpt-5.6-sol thinking=xhigh costs=919.75 -->
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Addressed active nested descendants through inactive parents and scoped friendly role-title guidance in c186a72. Updated the stale UI integration and Storybook contracts for transcript-canonical inactive children. Targeted unit/UI tests, the affected Integration suite, a rebuilt Storybook interaction run, and make static-check all pass locally.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c186a72d93

ℹ️ 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".

Comment thread src/browser/utils/ui/workspaceFiltering.ts
Comment thread src/common/utils/tools/toolDefinitions.test.ts Outdated
Carry the nearest visible parent into final sidebar connector layout, remove the tautological prompt-copy test, and stabilize the updated integration contract.

---

_Generated with `mux` • Model: `openai:gpt-5.6-sol` • Thinking: `xhigh` • Cost: `$919.75`_

<!-- mux-attribution: model=openai:gpt-5.6-sol thinking=xhigh costs=919.75 -->
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Addressed final connector ancestry propagation and removed the tautological prompt-copy assertion in 2516301. The targeted unit/UI regressions, affected Integration suite, rebuilt Storybook interaction suite, and make static-check pass locally.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2516301148

ℹ️ 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".

Comment on lines +2858 to +2860
parentId:
baseRowMeta.visibleParentWorkspaceId ??
workspace.parentWorkspaceId,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Propagate visible ancestry to grouped rows

When an active workflow/best-of grandchild is promoted through an inactive parent, this effective-parent propagation applies only to ordinary workspace nodes; the grouped-row branch above still assigns group.parentWorkspaceId, which is the hidden original parent. computeRowMetaForVisibleNodes() therefore cannot place the synthetic group header in the visible ancestor's sibling run, leaving its connector detached and preventing active-through state from reaching preceding visible siblings. Fresh evidence after 2516301 is that the new visibleParentWorkspaceId is consumed only after the group branch has already continued; use the anchor's effective parent for group headers as well.

Useful? React with 👍 / 👎.

Comment on lines +2858 to 2862
parentId:
baseRowMeta.visibleParentWorkspaceId ??
workspace.parentWorkspaceId,
depth: baseRowMeta.depth,
isRunning: isRunningOrStartingTaskStatus(workspace.taskStatus),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use continuation status for final connector activity

When a previously reported child is reawakened, its taskStatus intentionally remains reported while taskExecutionStatus becomes starting or running. Although computeAgentRowRenderMeta() recognizes that continuation as running, this final node reconstruction records isRunning: false and then recomputes the connector metadata, so the active child's shared trunk—and any trunk through preceding siblings—renders inactive. Derive this flag from the execution status/live-active helper as well as the original task status.

Useful? React with 👍 / 👎.

Render durable role titles before explicit variant scope labels and steer parents to keep role names relevant without repurposing grouped candidate workspaces.

---

_Generated with `mux` • Model: `openai:gpt-5.6-sol` • Thinking: `xhigh` • Cost: `$991.94`_

<!-- mux-attribution: model=openai:gpt-5.6-sol thinking=xhigh costs=991.94 -->
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Clarified the single-visible-variant presentation in afd02af: the durable role title now renders first in primary text, the retained lane metadata is explicitly labeled scope: in secondary text, and parent steering avoids repurposing grouped variant children for unrelated work while checking role-title relevance before reawakening. Focused UI/policy tests, rebuilt Storybook interactions, and make static-check pass locally.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: afd02af52a

ℹ️ 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".

Comment on lines +213 to +214
workspace.taskExecutionStatus === "starting" ||
workspace.taskExecutionStatus === "running" ||

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Count active continuations before completed group members

When a reported variant/best-of child is reawakened, it retains its completed report while taskExecutionStatus becomes starting or running; this helper correctly treats it as active, but computeSidebarTaskGroups() checks hasCompletedAgentReport(member) first and immediately continues. If multiple grouped children are reawakened, or one runs alongside another visible member, the group therefore reports them as completed, undercounts or zeroes runningCount, and renders inactive group status/connectors despite live work. Prioritize the continuation/delegated-activity state before completed-report aggregation.

Useful? React with 👍 / 👎.

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.

1 participant