-
Notifications
You must be signed in to change notification settings - Fork 0
revert(codex): remove superseded subagent status port #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1107,8 +1107,8 @@ export const makeCodexSessionRuntime = ( | |
| return false; | ||
| } | ||
| const activitySpawnTurnId = (yield* Ref.get(sessionRef)).activeTurnId ?? undefined; | ||
| const existingChild = (yield* Ref.get(collabChildAgentsRef)).get(item.agentThreadId); | ||
| yield* Ref.update(collabChildAgentsRef, (current) => { | ||
| const existing = current.get(item.agentThreadId); | ||
| const next = new Map(current); | ||
| // Merge-late semantics: when thread/started registered first, a | ||
| // later subAgentActivity still carries the real agentPath (and a | ||
|
|
@@ -1120,13 +1120,13 @@ export const makeCodexSessionRuntime = ( | |
| next.set(item.agentThreadId, { | ||
| agentThreadId: item.agentThreadId, | ||
| nickname: | ||
| existingChild?.nickname ?? | ||
| existing?.nickname ?? | ||
| item.agentPath.split("/").findLast((segment) => segment.length > 0), | ||
| role: existingChild?.role, | ||
| agentPath: existingChild?.agentPath ?? item.agentPath, | ||
| depth: existingChild?.depth, | ||
| parentThreadId: existingChild?.parentThreadId, | ||
| spawnTurnId: existingChild ? existingChild.spawnTurnId : activitySpawnTurnId, | ||
| role: existing?.role, | ||
| agentPath: existing?.agentPath ?? item.agentPath, | ||
| depth: existing?.depth, | ||
| parentThreadId: existing?.parentThreadId, | ||
| spawnTurnId: existing ? existing.spawnTurnId : activitySpawnTurnId, | ||
| }); | ||
| return next; | ||
| }); | ||
|
|
@@ -1142,29 +1142,6 @@ export const makeCodexSessionRuntime = ( | |
| activityKind: item.kind, | ||
| }, | ||
| }); | ||
| // 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; | ||
|
Comment on lines
1144
to
1145
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a child AGENTS.md reference: AGENTS.md:L146-L149 Useful? React with 👍 / 👎. |
||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When Claude emits a
task_updatedwithstatus: pausedfollowed by a metadata-only update such asdescriptionoris_backgrounded, the first event maps toidleand removes the task, but this narrowed guard lets the second status-freeupdatedevent 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-3301explicitly permits these status-free patches. Retain the same live-set guard forupdatedevents as forprogress.AGENTS.md reference: AGENTS.md:L146-L149
Useful? React with 👍 / 👎.