Repository navigation
fix(tasks): stream Codex subagent activity - #121899
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
marked this pull request as ready for review
August 11, 2026 06:28
steipete
force-pushed
the
steipete/subagent-activity-acp-runtime
branch
from
August 11, 2026 07:07
4cae7e9 to
5616934
Compare
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 12, 2026
* fix(tasks): stream Codex subagent activity * fix(tasks): honor registry access boundary
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #121549
What Problem This Solves
Fixes an issue where task rows for Codex/ACP native subagents stayed at bare lifecycle status while the child was actively producing assistant text and tool calls. The task registry keyed those rows as
codex-thread:<childThreadId>, but the child activity never reached the global agent-event fold under that identity, solastActivity,diffStat,toolUseCount, andlastToolNameremained empty.The same live probe also exposed two adjacent task-stream defects: identical summaries could be broadcast repeatedly during one burst, and an ordinary host-owned subagent run could receive both its authoritative
subagentrow and a redundant gatewayclirow for the same run.Why This Change Was Made
The Codex native-subagent monitor is the gateway boundary that observes child-thread app-server notifications. It now projects child assistant, reasoning-summary, and normalized tool events onto the existing global agent bus using the task's canonical
codex-thread:<childThreadId>run ID. The existing task-registry activity fold remains the only overlay owner; it additionally accepts Codex's normalizedfileChangechange/stat arguments while preserving the existing success-gated pending/result accounting, one-second throttle, overlay-only storage, and terminal flush/clear semantics.Task broadcasts now suppress only identical consecutive mapped summaries per task. Status changes remain immediate because status is part of the mapped summary. Gateway task tracking also consults the already-recorded run fact before creating a CLI row: when the same run ID and child session already own a
subagenttask, the redundant CLI producer stays off. Standalone CLI, ACP manual-spawn, and plugin-subagent tracking remain unchanged.No protocol, UI, SQLite schema, or persistence shape changed.
Codex dependency contract checked
Personally inspected sibling
openai/codexatc2bcb9a26b5bdbdc66c48cf3bc3bb382568e800c:codex-rs/app-server-protocol/src/protocol/v2/item.rs:1242-1252,1316-1346definesitem/started,item/completed, anditem/agentMessage/deltawith the authoritativethread_id.codex-rs/app-server-protocol/src/protocol/event_mapping.rs:362-418,428-463preserves that thread ID while mapping assistant deltas, generic item lifecycle, command starts, and command completions into app-server notifications.Sibling coverage
toolUseCountis not an equivalent contract for those records.User Impact
Clients receive one enriched task row for Codex native subagents, with live activity text, file-change totals, and tool metadata matching embedded subagents. Rapid no-op updates no longer produce identical task-event bursts, and ordinary subagent runs no longer appear twice as
subagentpluscli.ClawSweeper rank-up moves
review startedplaceholder for5616934f857a22151bcc40d9b78a0b631d38fee3, with no findings orRank-up moves:list. There is therefore nothing to apply or skip; the maintainer approved this landing, and the queued review publisher is non-blocking under repository policy.Evidence
running -> completedfor acodex-thread:*task with no activity/tool enrichment; rapid tool bursts produced roughly 14 identical task summaries in one second; each ordinary subagent run produced matchingsubagentandclirows.publishes child assistant and tool activity under the mirrored thread run idfail with an empty event list; restoring it passes.node scripts/run-vitest.mjs src/tasks/task-registry.test.ts src/gateway/server-runtime-subscriptions.test.ts src/gateway/server-methods/agent.test.ts extensions/codex/src/app-server/native-subagent-monitor.test.ts --testNamePattern "folds Codex native child activity|publishes child assistant and tool activity|suppresses identical task summaries|keeps a host-owned subagent run"— 4 files passed, 4 selected tests passed.node scripts/check-changed.mjs— passed the complete core/extension plan locally after configured remote providers reported unavailable: formatting, Plugin SDK closure, dead exports, production/test typechecks, lint, database-first, sidecar, import-cycle, webhook, and pairing guards.Production LOC: +157/-35 (net +122) | Tests: +212/-0
The production growth establishes the missing native-child event producer, reuses the canonical Codex tool normalization, adds normalized file-change folding, suppresses identical wire summaries, and removes redundant CLI bookkeeping. Live post-change verification on a dev gateway remains the maintainer follow-up for this investigation.