Skip to content

🤖 feat: allow agentId on workspace tasks (default exec) - #3957

Open
ThomasK33 wants to merge 16 commits into
mainfrom
agent-launcher-vq9m
Open

🤖 feat: allow agentId on workspace tasks (default exec)#3957
ThomasK33 wants to merge 16 commits into
mainfrom
agent-launcher-vq9m

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Aug 25, 2026

Copy link
Copy Markdown
Member

Summary

The task tool with kind: "workspace" now accepts an optional agentId (e.g. plan) selecting the agent mode for the launched turn, with fail-fast validation of unknown, internal (ui.hidden), and disabled agents before any workspace is created or any turn is dispatched. Omitted agentId preserves today's behavior exactly.

Background

Calling task with kind: "workspace" + agentId: "plan" previously failed schema validation ("Workspace tasks do not accept agentId or subagent_type"), making it impossible for an agent to launch new workspaces in plan mode. Plan mode needs no pre-setup (planFilePath is derived from workspace metadata), so a first turn with agentId: "plan" just works once the id reaches sendMessage.

Implementation

  • Schema (toolDefinitions.ts): the kind === "workspace" branch keeps rejecting only the deprecated subagent_type alias (message narrowed, issue path moved to ["subagent_type"]); agentId is now allowed and documented in the tool description.
  • Handler (tools/task.ts): forwards agentId into taskService.createWorkspaceTurn. The plan-mode-parent gate is untouched — a parent already in plan mode still cannot spawn workspace tasks.
  • Service (taskService.ts): new validateWorkspaceTurnAgentId helper (syntax → resolveAgentFrontmatter existence → resolveAgentVisibility().selectable!isAgentEffectivelyDisabled, the same rule set as the UI agent picker, so custom user-visible agents work without a hardcoded allowlist). Validation is fail-fast because resolveAgentForStream silently falls back to exec for top-level workspaces, which would hide the caller's mistake:
    • mode: "new": two-stage — owner checkout pre-create (bad ids create no workspace), target checkout post-create (project-local agent definitions can diverge across branches; on failure no turn is dispatched and the error names the created workspace, which is left as failed evidence since no safe pre-record cleanup path exists).
    • mode: "existing": validated against the target workspace's checkout; an explicit id is a per-turn override only — it wins over the resumed descendant-agent identity but never mutates persisted identity (no record/metadata schema changes).
    • Verification-window hardening (from review iterations): owner-side vouching for a not-yet-reachable created checkout requires git proof that the target's base branch is the branch actually checked out in the owner (workspace names are non-injective sanitizations) plus a shared agent-discovery host (local-family or same plain-SSH host; Coder per-workspace hosts and containers fail closed even for built-ins, which target-host globals could shadow). Project-scope definitions always fail closed while the target is unreachable, and a strict-validation miss during a still-running init hook fails with an explicitly transient error. Failures settle through the handle machinery (created workspace stays owner-owned and retryable via mode: "existing") without persisting attentionPolicy, so the synchronous error is never duplicated by a terminal wake. Owner-side prechecks and unreachable-target vouching are fatal only when the owner's checked-out branch is git-proven to be the target's base. As the final backstop, explicit overrides dispatch with strictAgentResolution: stream-time resolution (which runs after init completes) fails the stream loudly if the requested agent cannot be resolved or is disabled, instead of silently falling back to exec.
    • The finalized agent id drives agent-default AI-settings resolution, so a plan-mode launch gets plan-agent defaults; explicit model/thinking overrides and follow-up target-settings precedence are unchanged.

Validation

Beyond unit tests and make static-check, live dogfooding against an isolated dev-server sandbox (temp XUM_ROOT), driving the real task tool through a real model in the web UI:

  • agentId: "plan" → launched workspace's first turn ran in plan mode: plan file written under ~/.xum/plans/…, propose_plan completed, plan proposal card with Implement button; persisted last-used agent plan.
  • omitted agentId → turn resolved to exec (default unchanged).
  • agentId: "compact"Task.createWorkspaceTurn: agentId is not selectable for workspace turns (compact), no workspace created.
  • agentId: "doesnotexist"Task.createWorkspaceTurn: unknown agentId (doesnotexist), no workspace created (sandbox config verified).

taskService.test.ts shows 3 pre-existing failures that reproduce identically on a clean-HEAD probe worktree (unrelated to this change).

Risks

Low. The default path (agentId omitted) is byte-for-byte the previous behavior, pinned by existing tests. The new validation only runs for explicit ids and fails closed. The riskiest surface is the post-create re-validation in mode: "new", which can leave a created-but-undispatched workspace behind on divergence — rare, surfaced with a clear error naming the workspace.


📋 Implementation Plan

Allow agentId on workspace tasks (default exec)

Context

Calling the task tool with kind: "workspace" + agentId: "plan" fails schema validation:
"Workspace tasks do not accept agentId or subagent_type". This makes it impossible to tell an agent
to launch new workspaces in plan mode.

Verified facts:

  • Schema rejection: refineTaskToolAgentArgs in src/common/utils/tools/toolDefinitions.ts (~366–411) rejects agentId/subagent_type whenever kind === "workspace".
  • Hardcoded default: src/node/services/taskService.ts createWorkspaceTurn (~3674): let workspaceTurnAgentId = "exec"; → passed to workspaceService.sendMessage(..., { agentId, ... }) (~3882–3894).
  • Unknown agents do NOT error at stream time: resolveAgentForStream (src/node/services/agentResolution.ts:267–279) silently falls back to exec for top-level workspaces. So fail-fast validation must happen in createWorkspaceTurn, before workspace creation.
  • A reusable "which agents can a normal workspace turn use" filter already exists: resolveAgentFrontmatter(runtime, workspacePath, agentId) (existence; throws Agent definition not found), resolveAgentVisibility(frontmatter.ui)selectable (src/node/services/agentDefinitions/agentVisibility.ts:16–20, mirrors the UI picker filter uiSelectable), and isAgentEffectivelyDisabled. Built-ins: exec/plan are selectable; explore, compact, desktop, dream, name_workspace have ui.hidden: true. Custom user agents without ui.hidden are selectable.
  • Plan mode needs no pre-setup: planFilePath is computed from workspace metadata in streamContextBuilder, so a first turn with agentId: "plan" just works (plan-file-locked edits, propose_plan enabled).
  • Workspace-turn records store no agent identity: neither WorkspaceTurnTaskHandleRecord (src/node/services/taskHandleStore.ts:51–125) nor buildWorkspaceTurnMuxMetadata (taskService.ts:10843–10852) has an agent field. mode: "existing" follow-ups resume agent identity only for descendant agent-task workspaces via resolveTaskAgentIdForResume (reads agentId/agentType from the workspace config entry); follow-ups to mode: "new"-created normal workspaces always default to exec today.

Behavior contract

  • kind: "workspace" accepts optional agentId (normalized via existing TaskAgentIdSchema: trim + lowercase).
  • Scope note: this lets exec/custom-mode parents launch plan-mode workspaces. It does not change the plan-mode-parent gate: a parent already in plan mode still cannot spawn workspace tasks (src/node/services/tools/task.ts ~415–417 and the existing rejection test stay untouched).
  • Omitted agentId → behavior unchanged: "exec" for new workspaces; resumed identity for mode: "existing" follow-ups to descendant agent workspaces; exec for follow-ups to normal workspaces.
  • Explicit agentId on mode: "existing" is a per-turn override only — it changes that turn's agent, never mutates the target workspace's persisted identity (nothing is written; records store no agent field, and we intentionally do not add one).
  • subagent_type stays rejected for workspace tasks (deprecated sub-agent alias); refinement error message narrows to "Workspace tasks do not accept subagent_type" with the zod issue path on ["subagent_type"] (not ["agentId"]).
  • Validation (fail-fast, via a small shared helper validateWorkspaceTurnAgentId(runtime, workspacePath, agentId) so existence/selectable/disabled logic cannot drift):
    • Syntax: AgentIdSchemaErr on invalid syntax.
    • Eligibility check: resolveAgentFrontmatter (existence) → resolveAgentVisibility(...).selectable (rejects internal agents like compact) → not isAgentEffectivelyDisabled — same rule set as the UI agent picker, so custom user-visible agents work without a hardcoded allowlist.
    • mode: "existing": validate against the target workspace path (the workspace whose turn will run), before dispatch.
    • mode: "new": two-stage. Pre-create validation against the owner workspace path catches obvious bad ids (doesnotexist, compact) with no workspace created. After workspaceService.create, re-validate against the target workspace path before sendMessage (project-local agent definitions can diverge across branches/worktrees — owner-path resolution is not an invariant); the finalized id feeds AI-settings resolution. If target validation fails, do not dispatch the turn — surface a clear handle/tool error; decide at implementation time whether to leave the created workspace as failed evidence or clean up (only if existing lifecycle code already supports safe cleanup).
    • Rationale: without this, resolveAgentForStream would silently run exec, hiding the caller's mistake.
  • AI-settings invariant: the finalized workspaceTurnAgentId (after explicit override) is the id used wherever agent-default model/thinking settings are resolved in createWorkspaceTurn, so a plan-mode workspace gets plan-agent defaults. Precedence preserved: explicit tool model/thinking > existing target settings on follow-ups > agent defaults; parent pro-mode inheritance logic untouched (covered by existing tests).

Changes (net product LoC: ~ +45–60)

  1. src/common/utils/tools/toolDefinitions.ts

    • refineTaskToolAgentArgs: in the kind === "workspace" branch, stop rejecting agentId; keep rejecting subagent_type with narrowed message and issue path ["subagent_type"].
    • buildTaskToolDescription: document that workspace tasks accept optional agentId (agent mode for the launched turn, e.g. plan), default exec; internal agents are not eligible.
  2. src/node/services/tools/task.ts (~419–442)

    • In the kind === "workspace" branch, forward the provided agentId into taskService.createWorkspaceTurn({...}).
  3. src/node/services/taskService.ts

    • Add agentId?: string to WorkspaceTurnCreateArgs (~520–544).
    • New helper validateWorkspaceTurnAgentId(runtime, workspacePath, agentId): syntax (AgentIdSchema) → existence (resolveAgentFrontmatter) → selectable (resolveAgentVisibility) → not disabled (isAgentEffectivelyDisabled), mirroring the sub-agent path at ~4202–4207.
    • In createWorkspaceTurn: when args.agentId is provided, run the helper (owner path pre-create for mode: "new", target path for mode: "existing"; target-path re-validation after create for mode: "new") and set workspaceTurnAgentId from it — override wins over resume identity. Otherwise keep existing defaults.
    • Route the finalized workspaceTurnAgentId into the "agent defaults on create" AI-settings resolution instead of implicit exec.
    • No record/metadata schema changes: WorkspaceTurnTaskHandleRecord and WorkspaceTurnMuxMetadata deliberately stay agent-free (per-turn override semantics; avoids schema churn and accidental identity mutation).

Tests

  • src/common/utils/tools/toolDefinitions.test.ts
    • New: accepts workspace task args with agentId: "plan".
    • New: still rejects subagent_type for workspace tasks.
    • Existing "accepts workspace task args without an agent id" stays green.
  • src/node/services/tools/task.test.ts
    • New: forwards agentId to createWorkspaceTurn for workspace kind.
    • Existing "should reject workspace turns while in plan agent" stays green.
  • src/node/services/taskService.test.ts
    • New: createWorkspaceTurn with agentId: "plan"sendMessage called with agentId: "plan".
    • New: explicit agentId overrides resume identity on mode: "existing" follow-up to a descendant agent workspace.
    • New: omitted agentId on mode: "existing" follow-up still resumes the persisted identity (pin current behavior).
    • New: unknown agent id → Err, no workspace created (mode: "new" pre-create stage).
    • New: internal/hidden agent (e.g. compact) → Err.
    • New: target-path re-validation failure after create → no turn dispatched, clear handle error surfaced.
    • Existing default assertion (agentId: "exec", ~line 962) stays green.

Dogfooding & quality gates

Gate A (after implementation, before dogfooding):

  • Targeted: bun test src/common/utils/tools/toolDefinitions.test.ts src/node/services/tools/task.test.ts src/node/services/taskService.test.ts
  • Full: make typecheck then make static-check.

Gate B (live dogfood, evidence required):

  1. Use the dev-server-sandbox skill to launch an isolated dev-server instance (temp XUM_ROOT, free port).
  2. In a scratch project, create a parent workspace in exec mode; instruct it to call the task tool with {"kind":"workspace","agentId":"plan","prompt":"Plan a small change...","title":"Plan dogfood"} (drive via bun run debug send-message <workspace-id> or agent-browser against the web UI).
  3. Verify the spawned workspace's first turn runs in plan mode: UI mode indicator shows Plan, propose_plan/plan-file behavior active.
  4. Verify default: same call without agentId still starts in exec.
  5. Verify fail-fast: agentId: "compact" and agentId: "doesnotexist" return clear tool errors and create no workspace.
  6. Evidence: agent-browser screenshots of the tool call arguments/result and the spawned workspace's mode indicator, plus a screen recording (agent-browser video recording) of the plan-mode launch flow; attach via attach_file.

Acceptance criteria

  • task with kind: "workspace", agentId: "plan" succeeds; launched workspace's first turn runs in plan mode with plan-agent default AI settings.
  • Omitting agentId preserves today's behavior exactly (existing tests pass unmodified except the narrowed rejection message test).
  • Invalid-syntax, unknown, internal/hidden, and disabled agent ids fail with a clear Err before any workspace is created — no silent exec fallback.
  • Explicit agentId on existing-workspace follow-ups overrides for that turn only; no persisted identity changes.
  • Plan-mode parents still cannot spawn workspace tasks.
  • make static-check green; Gate B evidence captured.

Generated with xum • Model: anthropic:claude-fable-5 • Thinking: xhigh • Cost: $37.19

The task tool with kind: "workspace" now accepts an optional agentId
(e.g. "plan") selecting the agent mode for the launched turn. Omitted
agentId preserves existing behavior: exec for new workspaces, resumed
identity for mode: "existing" follow-ups to descendant agent workspaces.

Because resolveAgentForStream silently falls back to exec for top-level
workspaces, createWorkspaceTurn validates explicit ids fail-fast via a
shared helper (syntax -> existence -> ui-selectable -> not disabled,
mirroring the UI agent picker): pre-create against the owner checkout
and post-create against the target checkout for mode: "new", and against
the target checkout for mode: "existing". Explicit ids are per-turn
overrides only; no record/metadata schema changes. subagent_type stays
rejected for workspace tasks (issue path narrowed to the field itself).
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

This comment has been minimized.

@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: e01195b864

ℹ️ 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
Comment thread src/node/services/taskService.ts Outdated
Comment thread src/node/services/taskService.ts
Comment thread src/node/services/taskService.ts
Comment thread src/node/services/taskService.ts
- Resolve agent discovery paths via resolveWorkspaceRootPath so Docker
  targets use the container-side runtime path (P1)
- Include Agent Plugins roots in validation when the experiment is on (P2)
- Skip post-create target re-validation while the created checkout is not
  reachable yet (deferred-provisioning runtimes) instead of stranding the
  launch; owner-side validation still gates obviously-bad ids (P1)
- Reject explicit agentId for descendant agent workspace targets: stream
  resolution pins children to persisted identity, so an override could
  never actually run (P1)
- Dispatch existing-target overrides with skipAiSettingsPersistence so the
  target's saved agent/settings stay untouched; new workspaces still
  persist the requested agent as their default (P1)
- Pass the validated checkout as definitionContext to AI-settings
  resolution so agent frontmatter ai defaults apply (P1)
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

This comment has been minimized.

@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: 931084c6c2

ℹ️ 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
Round 2 Codex findings: unreachable target checkouts (deferred
provisioning, stopped containers) now use a consistent policy instead of
skipping (mode new) or strict-failing with a misleading error (mode
existing): built-in agents validate against embedded definitions and
launch safely; non-built-in agents fail with an explicit reachability
error, preventing a silent exec fallback at stream time.
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

This comment has been minimized.

@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: ce92a4aef7

ℹ️ 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
Comment thread src/node/services/taskService.ts Outdated
Comment thread src/node/services/taskService.ts
Comment thread src/node/services/taskService.ts Outdated
…record

Round 3 Codex findings: (1) post-create validation failures now write the
workspace-turn record first and settle it as an error, so the created
workspace stays owner-owned and a mode="existing" retry passes the
ownership check instead of hitting invalid_scope; (2) unreachable-target
built-in ids are validated against the owner's checkout (same project), so
a project-local shadow of a built-in id — including its ui/disabled
state — is respected instead of trusting embedded membership alone.
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

This comment has been minimized.

@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: ab12c42326

ℹ️ 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
…heckouts

Round 3 P2: gate unreachable-target validation on the winning definition's
scope resolved via the owner context, not built-in membership — host-side
definitions (built-in, global, plugin) resolve independently of the target
checkout, while project-scoped definitions keep failing closed.

@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: 3dbef2ed51

ℹ️ 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
Round 4 Codex findings:
- NodeAgentDefinitionContext carries includeAgentPlugins so AI-settings
  resolution reads plugin agents' frontmatter ai defaults and base chains
  (wired for both workspace turns and sub-agent creation)
- A trunkBranch different from the owner's branch makes owner-side agent
  resolution advisory: target-branch-only agents launch after strict
  post-create target validation instead of failing "unknown agentId"
- The same divergence makes unreachable targets fail closed for every id
  (the target branch can shadow even built-ins); the settled record keeps
  the workspace retryable via mode="existing"

@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: 08bab92eb3

ℹ️ 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
Comment thread src/node/services/taskService.ts
…ble errors

Round 5 Codex findings: agent validation contexts now use
createRuntimeContextForWorkspace — the exact helper the stream uses — so
subproject workspaces validate against the same discovery path that will
stream (subproject-only agents pass; root/sub mismatches cannot slip
through). Post-create validation failures on disposable workspaces no
longer advertise a mode="existing" retry, since disposable settlement
cleans the workspace up.
…compare

Round 6 Codex findings: existing targets have unknown checkout provenance,
so explicit agent overrides fail closed while the checkout is unreachable
(default identity keeps working); the trunkBranch divergence check compares
via sanitizeBranchNameForWorkspace so feature/foo is not treated as
divergent from its own workspace feature-foo; and synchronous post-create
validation failures strip attentionPolicy from the settled record to avoid
a duplicate terminal wake on top of the synchronous tool error.
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

This comment has been minimized.

@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: b2b5618da6

ℹ️ 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
Comment thread src/node/services/taskService.ts
Comment thread src/node/services/taskService.ts
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Round-7 fixes pushed in b267445:

  • Owner-side base vouching now compares against the branch actually checked out in the owner (git), not the non-injective workspace name — colliding requests fail closed.
  • Unreachable-target owner proxy additionally requires owner/target agent discovery to share a host filesystem; cross-host (Coder per-workspace hosts, containers) fails closed even for built-ins.
  • attentionPolicy is stripped before the initial record persist on synchronous validation failures, so settlement cannot enqueue a duplicate terminal wake.
  • Strict-validation misses on reachable checkouts with a running init hook now fail with an explicitly transient "still initializing" error instead of a definitive verdict; retryable via mode="existing".

@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: b267445ab7

ℹ️ 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
@chatgpt-codex-connector

This comment has been minimized.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@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: 4566a2c898

ℹ️ 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/agentSession.ts
@chatgpt-codex-connector

This comment has been minimized.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

This comment has been minimized.

@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: de00023f45

ℹ️ 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
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@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: 5b8ebd741c

ℹ️ 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/agentResolution.ts
@chatgpt-codex-connector

This comment has been minimized.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

This comment has been minimized.

@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: e572dac6ec

ℹ️ 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/agentResolution.ts Outdated
Comment thread src/node/services/agentResolution.ts Outdated
Comment thread src/node/services/agentResolution.ts Outdated
…shadows; strict fail-closed on eligibility errors
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

This comment has been minimized.

@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: f2e23b8c22

ℹ️ 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/message.ts
Comment thread src/node/services/taskService.ts
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: cd0f47eb5a

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

@chatgpt-codex-connector

This comment has been minimized.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@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: 6f24c86fc9

ℹ️ 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 +12206 to +12208
if (message.role !== "user") {
continue;
}

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 Stop reusing overrides after delegated turns finish

When an existing-workspace turn with an explicit override finishes normally while one of its background bashes remains monitored, a later monitor match is a new synthetic turn, not a continuation of the completed delegated turn. This scan ignores all assistant messages—including the terminal finishReason: "stop" response—so the old workspace-task user row is still selected and its per-turn agent/model/strictness overrides are reused. The late wake can therefore run under the previous override instead of the target's persisted defaults, or fail and be consumed if that agent has since disappeared; stop scanning when a terminal assistant closes the delegated turn, like the open-correlation logic does.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 6f24c86fc9

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

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