fix(codex): surface native subagent task updates#96662
Conversation
|
Codex review: stale review; fresh review needed. Summary Next step Review history (1 earlier review cycle)
|
|
Maintainer note for #87666 channel proof: I verified the code path with focused tests and I do not have the repository channel secrets or a configured live Telegram/Discord gateway in this fork environment. Please either:
The relevant local evidence already run:
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Addressed the ClawSweeper finding about Follow-up commit Re-run locally after the follow-up:
The previous Mantis run failed because both baseline and candidate were skipped: @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
CI note: the current The failed step is The subsequent SARIF upload failed only because the scan never produced Please rerun the failed OpenGrep job/run when convenient. |
|
Addressed ClawSweeper's This change keeps explicit
That closes the quiet direct-embedded path called out in Re-run locally after the follow-up:
Live channel proof is still pending on maintainer infrastructure. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
…x-native-subagent-visibility-87666 # Conflicts: # src/agents/embedded-agent-runner/run.ts
|
This pull request has been automatically marked as stale due to inactivity. |
What Problem This Solves
Fixes an issue where operators using channel-backed Codex multi-agent runs could not see native subagent lifecycle updates when a Codex native subagent was spawned. The mirrored task rows could still fall back to
silent/not_applicableon direct embedded paths even when the parent run had a real channel target.Fixes #87666.
Why This Change Was Made
Native Codex subagent mirror rows already derive direct-delivery behavior from
requesterOrigin. This follow-up closes the remaining propagation gap by deriving the harness task runtimerequesterOriginfrom explicit embedded-run delivery fields when callers providemessageChannel/messageTo/agentAccountId/messageThreadIdbut omit the new field. ExplicitrequesterOriginstill wins unchanged.That keeps gateway/user paths stable while covering direct embedded cron-style runs that were still creating quiet mirror rows. I also re-checked the sibling Codex runtime before changing behavior:
codex-rs/app-server-protocol/schema/typescript/v2/ThreadItem.tsincludessubAgentActivity, and OpenClaw's native subagent mirror still sits on top of app-server thread lifecycle and progress notifications rather than inventing a parallel Codex contract.User Impact
Operators on channel-backed parent Codex runs can receive native subagent task state changes instead of having mirror tasks hidden by
silent/not_applicablewhen the embedded run already knows the real requester route. Internal or orphan native subagent mirrors remain quiet.Evidence
node scripts/run-vitest.mjs run --config test/vitest/vitest.agents-embedded-agent.config.ts src/agents/embedded-agent-runner/run.before-agent-reply-cron.test.ts --reporter=verbosenode scripts/run-vitest.mjs run --config test/vitest/vitest.plugin-sdk.config.ts src/plugin-sdk/agent-harness-task-runtime.test.ts --reporter=verbosenode scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.test.src.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/test-src-87666.tsbuildinfogit diff --checkNot run: live channel proof. This still needs a configured channel/gateway environment and maintainer confirmation of the chosen delivery behavior.