revert(codex): remove superseded subagent status port - #68
Conversation
This reverts commit 3461fc3.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9acf55675b
ℹ️ 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".
| // Status-free progress is a description tick, not a restart. A delayed | ||
| // progress event after idle must not put the task back in the live set | ||
| // (#7128). | ||
| if (input.kind === "progress" && input.status === undefined) { |
There was a problem hiding this comment.
Keep status-free updates from reviving idle tasks
When Claude emits a task_updated with status: paused followed by a metadata-only update such as description or is_backgrounded, the first event maps to idle and removes the task, but this narrowed guard lets the second status-free updated event fall through and add it back as live. The sidebar then remains incorrectly pinned to Working until another terminal update or session exit; ClaudeAdapter.ts:3275-3301 explicitly permits these status-free patches. Retain the same live-set guard for updated events as for progress.
AGENTS.md reference: AGENTS.md:L146-L149
Useful? React with 👍 / 👎.
| }); | ||
| // A child turn can start before this activity registers the child. | ||
| // The foreign-notification suppressor records that live turn but | ||
| // cannot emit agent lifecycle until identity is known. Replay the | ||
| // explicit start after first registration so sidebar liveness sees | ||
| // genuine work; a trailing interaction with no live turn remains | ||
| // the status-free metadata update mapped by CodexAdapter. | ||
| const preRegistrationLiveTurn = (yield* Ref.get(collabChildLiveTurnsRef)).get( | ||
| item.agentThreadId, | ||
| ); | ||
| if (!existingChild && item.kind === "interacted" && preRegistrationLiveTurn) { | ||
| yield* emitEvent({ | ||
| kind: "notification", | ||
| threadId: options.threadId, | ||
| ...(registeredChild?.spawnTurnId ? { turnId: registeredChild.spawnTurnId } : {}), | ||
| method: "collabAgent/turnStarted", | ||
| payload: { | ||
| agentThreadId: item.agentThreadId, | ||
| ...(registeredChild?.nickname ? { nickname: registeredChild.nickname } : {}), | ||
| ...(registeredChild?.role ? { role: registeredChild.role } : {}), | ||
| agentPath: item.agentPath, | ||
| }, | ||
| }); | ||
| } | ||
| return true; |
There was a problem hiding this comment.
Preserve pre-registration child starts
When a child turn/started arrives before registration and its first subAgentActivity is interacted, the foreign-notification suppressor records and discards that start, but this path now returns without replaying it after registration. CodexAdapter.ts:593-595 intentionally emits nothing for interacted, so no task.started or running update reaches liveness and the thread can appear idle while the child is still working. Replay the recorded live turn for this first-registration case before returning.
AGENTS.md reference: AGENTS.md:L146-L149
Useful? React with 👍 / 👎.
|
Both Codex findings are valid. An isolated revert would temporarily reintroduce the generic status-free update bug and the pre-registration child-start race. Closing this PR unmerged; the replacement will atomically revert #48 and reapply only the independently needed pingdotgg#7468 and narrowed pingdotgg#7848 changes on top of merged pingdotgg#7937. |
Upstream pingdotgg#7937 merged the core stale-Working fix and LastCode's 1170 nightly now carries that implementation. The older LastCode #48 port bundled a different adapter strategy with two independent safeguards, so keeping it as one downstream patch obscures which behavior remains locally owned.
This reverts LastCode #48 in full on top of the nightly that already contains pingdotgg#7937. A separate follow-up port will retain only the still-needed pieces:
task.updatedliveness hardening tracked in fix(server): status-free task updates no longer revive an idle task pingdotgg/t3code#7468.Validation:
Prepared by gpt-5.6-sol through the Codex harness.