Skip to content

fix(codex): keep finished subagents from pinning Working - #48

Merged
lastobelus merged 3 commits into
lastcode/mainfrom
port/upstream/codex-subagent-working-state
Aug 21, 2026
Merged

fix(codex): keep finished subagents from pinning Working#48
lastobelus merged 3 commits into
lastcode/mainfrom
port/upstream/codex-subagent-working-state

Conversation

@lastobelus

@lastobelus lastobelus commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Codex can emit a trailing interacted notification after a child turn completes, and can emit a real child turn start before the activity that registers that child. Treating every interaction as running revives idle children, while treating every interaction as metadata can miss a genuinely live pre-registration turn.

This port retains the complete upstream candidate:

Upstream PR: pingdotgg#7848
Generic hardening PR: pingdotgg#7468
Issue: pingdotgg#7726

Validation:

  • 87 focused adapter, runtime, liveness, and client-fold tests passed
  • focused lint and formatting passed
  • quick local CI passed before the review fix; final exact-head full CI will run before merge

Prepared by gpt-5.6-sol through the Codex harness.

lastobelus and others added 2 commits August 21, 2026 14:56
The revival guard only covered `progress`, so a status-free `updated`
sailed past it and put an already-dropped task back in the live set.
Claude's adapter emits exactly that whenever a task patch carries only
a description, error, end_time or is_backgrounded, which left the
sidebar pill pinned on "working" until session exit.

Same bug class as pingdotgg#7128/pingdotgg#7172, which fixed it for `progress` only.
`started` stays excluded on purpose so a genuine restart still revives;
a second test pins that so the guard can't over-correct.
@lastobelus
lastobelus force-pushed the port/upstream/codex-subagent-working-state branch from 681de6f to 05bbb5d Compare August 21, 2026 21:56
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: e8be81070e

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

@lastobelus
lastobelus marked this pull request as ready for review August 21, 2026 22:37
@lastobelus
lastobelus merged commit 9cf7108 into lastcode/main Aug 21, 2026
@lastobelus
lastobelus deleted the port/upstream/codex-subagent-working-state branch August 21, 2026 22:37
lastobelus added a commit that referenced this pull request Aug 22, 2026
Codex can emit a trailing interacted notification after a child turn
completes, and can emit a real child turn start before the activity that
registers that child. Treating every interaction as running revives idle
children, while treating every interaction as metadata can miss a
genuinely live pre-registration turn.

This port retains the complete upstream candidate:
- pingdotgg#7848 maps interacted to a status-free identity update
and replays an explicit start only when registration finds a recorded
live turn.
- pingdotgg#7468 hardens generic task liveness so status-free
task.updated events cannot revive an idle task; its original authored
commit is preserved.

Upstream PR: pingdotgg#7848
Generic hardening PR: pingdotgg#7468
Issue: pingdotgg#7726

Validation:
- 87 focused adapter, runtime, liveness, and client-fold tests passed
- focused lint and formatting passed
- quick local CI passed before the review fix; final exact-head full CI
will run before merge

Prepared by gpt-5.6-sol through the Codex harness.

---------

Co-authored-by: Jeremy Schoemaker <jeremy@shoemoney.com>
lastobelus added a commit that referenced this pull request Aug 22, 2026
Codex can emit a trailing interacted notification after a child turn
completes, and can emit a real child turn start before the activity that
registers that child. Treating every interaction as running revives idle
children, while treating every interaction as metadata can miss a
genuinely live pre-registration turn.

This port retains the complete upstream candidate:
- pingdotgg#7848 maps interacted to a status-free identity update
and replays an explicit start only when registration finds a recorded
live turn.
- pingdotgg#7468 hardens generic task liveness so status-free
task.updated events cannot revive an idle task; its original authored
commit is preserved.

Upstream PR: pingdotgg#7848
Generic hardening PR: pingdotgg#7468
Issue: pingdotgg#7726

Validation:
- 87 focused adapter, runtime, liveness, and client-fold tests passed
- focused lint and formatting passed
- quick local CI passed before the review fix; final exact-head full CI
will run before merge

Prepared by gpt-5.6-sol through the Codex harness.

---------

Co-authored-by: Jeremy Schoemaker <jeremy@shoemoney.com>
lastobelus added a commit that referenced this pull request Aug 22, 2026
Codex can emit a trailing interacted notification after a child turn
completes, and can emit a real child turn start before the activity that
registers that child. Treating every interaction as running revives idle
children, while treating every interaction as metadata can miss a
genuinely live pre-registration turn.

This port retains the complete upstream candidate:
- pingdotgg#7848 maps interacted to a status-free identity update
and replays an explicit start only when registration finds a recorded
live turn.
- pingdotgg#7468 hardens generic task liveness so status-free
task.updated events cannot revive an idle task; its original authored
commit is preserved.

Upstream PR: pingdotgg#7848
Generic hardening PR: pingdotgg#7468
Issue: pingdotgg#7726

Validation:
- 87 focused adapter, runtime, liveness, and client-fold tests passed
- focused lint and formatting passed
- quick local CI passed before the review fix; final exact-head full CI
will run before merge

Prepared by gpt-5.6-sol through the Codex harness.

---------

Co-authored-by: Jeremy Schoemaker <jeremy@shoemoney.com>
lastobelus added a commit that referenced this pull request Aug 22, 2026
Codex can emit a trailing interacted notification after a child turn
completes, and can emit a real child turn start before the activity that
registers that child. Treating every interaction as running revives idle
children, while treating every interaction as metadata can miss a
genuinely live pre-registration turn.

This port retains the complete upstream candidate:
- pingdotgg#7848 maps interacted to a status-free identity update
and replays an explicit start only when registration finds a recorded
live turn.
- pingdotgg#7468 hardens generic task liveness so status-free
task.updated events cannot revive an idle task; its original authored
commit is preserved.

Upstream PR: pingdotgg#7848
Generic hardening PR: pingdotgg#7468
Issue: pingdotgg#7726

Validation:
- 87 focused adapter, runtime, liveness, and client-fold tests passed
- focused lint and formatting passed
- quick local CI passed before the review fix; final exact-head full CI
will run before merge

Prepared by gpt-5.6-sol through the Codex harness.

---------

Co-authored-by: Jeremy Schoemaker <jeremy@shoemoney.com>
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.

2 participants