Skip to content

feat(agents): keep child tasks alive across Action waits - #555

Merged
lastobelus merged 10 commits into
lastcode/mainfrom
lastcode/child-action-continuations
Nov 1, 2026
Merged

lastobelus merged 10 commits into
lastcode/mainfrom
lastcode/child-action-continuations

Conversation

@lastobelus

@lastobelus lastobelus commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

A delegated child can end its turn while a resumable Project Action is still running. That turn must not become the task's final result or make the parent poll for progress.

Part of #482, which stays open. This is Phase 3 of the four-phase rollout.

  • Keep the same delegated task through the child Action, its automatic continuation and the eventual final result. Intermediate turns remain unfinished; the parent gets one final result.
  • Attribute native Codex and Claude Action calls to an exact execution. Refuse unattributed child calls, retain checks after remote disposal, and preserve ordinary top-level and explicitly independent Actions.
  • Stage remote delegation before execution, recover interrupted handoffs, and stop only work owned by the cancelled task. Discarding an interrupted Action reports interruption rather than an earlier waiting message.
  • Protect outstanding owned work from automatic settlement and enable child Action guidance conditionally on runtime capability and an accepted installed checkpoint. Reuse fix(server): deliver delegated children's background command results to the parent #484 and fix(server): deliver Action results that finish during a pause #497.

Validation on the refreshed base: ownership/Stop/remote protocol, native-subagent cancellation and context-budget integration passed 154 tests across six suites. All 35 affected package typechecks passed. The provider/replay and thread-lifecycle checks passed 622 tests across 10 suites; the final combined changed-file check passed 1,461 tests across 49 files and all fast checks, including the full PDF browser file. Current generated Action requests decode; Action policy, tool descriptions, schemas and cases match the previously validated head. The shared runtime PR-wait sentence differs; this does not claim full request equivalence. Prompt growth remains the approved 1,214 Claude / 1,212 Codex / 1,438 tool-inventory bytes.

Earlier development evidence remains separately pinned: an actual isolated Codex parent/child run launched the command once, resumed the child under the same task ID, and delivered one final parent result without parent polling. Original/later-round Stop and interrupted-result regressions have red/green proof. A refreshed-base archive test also reproduced a race in its global no-event assertion; it now settles descendant and owner completion results through the existing locked recovery helper before checking rejected deletion. No production code or expectations changed in that repair. The remote background-cancellation finding is fixed separately: disposal routes its latest ended owned run through normal interruption when provider background work remains, with a narrow unfinished-item read and an unrelated-later-round guard. The existing remote Stop regression fails before the fix and passes both cases afterward. Queued cancellation now settles explicitly owned local rounds and remote associations even when their run never started; those unstarted runs cannot inherit or interrupt unrelated provider background work. Existing follow-up and remote-protocol cases reproduce both failures before the correction and pass afterward, including independent result delivery and a parent wake. Shutdown now interrupts the exact owned task before disposing its Action; existing original/later/remote integration cases reproduce stale successful recovery before the fix and pass afterward. Remote activation also uses common update-drain admission; drain and claim-race regressions preserve refusal without side effects, retry and receipt replay. The repeated Web CI failure reached the PDF test deadline during its fourth document load. Its independent restoration and first-page/different-file scenarios are split into two cases, preserving assertions and the deadline; both pass in the real browser locally. Final focused model checks passed 10/11 retained samples across five cases; all five passed by majority. The failed handoff sample made extra shell reads without launching an Action. The full model run passed 197/224 completed samples, with 27 failures and two incomplete samples retained (93/113 cases passed by majority). Audited failures include actor misses, fixture/policy mismatches and API errors; no concrete blocking Phase 3 regression was established. These are historical model results, not an exact-head full pass or an absence-of-regression claim. Quick CI passed for 9ef44f5f76a3d670230613cbbf47bbe0bc915b3c against 446b3b054710e41c615a4b6689bab9f2aa4af0de. Exact-head/base GitHub CI and Codex review passed with zero unresolved findings.

Installed Phase 3 acceptance remains open: exact installed artifacts, the required provider pairs and later rounds, cross-environment ownership/recovery, cancellation on reused provider sessions, Pause/restart, matching clients and representative real use. Source merge does not enable ordinary child-owned Actions for an unaccepted installed version. Child PR watching remains Phase 4.

Implemented by GPT-6.1 Sol through the Codex harness, with Codex implementation assistance and Astra High source reviews. Claude wrote the agent guidance.

Co-Authored-By: OpenAI Codex [email protected]
Co-Authored-By: Claude Opus 5.5 [email protected]

@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T01:34:59.283953Z 9ef44f5 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ba7538086f

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

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 49e6be74b7

ℹ️ 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 October 31, 2026 10:45
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: b40224f9e9

ℹ️ 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 added the agent-context-increase Intentional agent context growth approved by a maintainer label Oct 31, 2026
@lastobelus
lastobelus force-pushed the lastcode/child-action-continuations branch from b40224f to 1e6f9b2 Compare October 31, 2026 23:47
@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: 1e6f9b2aa3

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

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cd9e1a3f2c

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

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6ae616bf28

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

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ff35425805

ℹ️ 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 force-pushed the lastcode/child-action-continuations branch from ff35425 to 7eaff77 Compare November 1, 2026 01:18
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

lastobelus and others added 8 commits October 31, 2026 18:20
Keep app-owned delegated tasks unfinished while a resumable Project Action owns their continuation. Bind calls to native provider executions, persist the owner with its continuation fence, and preserve exact task ownership through local and linked-environment waits, recovery, cancellation and final delivery.

Part of #482. Reuse the existing background-result and pause-delivery repairs from #484 and #497.

Carry-Group: incubator
Carry-Fix: #482
Carry-Observation: The ownership fences depend on pause-aware Action delivery and linked-environment delegation in Incubator. Provider attribution, task finalization, recovery and remote handoff must ship together.
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep attribution checks on disposed and settled remote children until they are explicitly independent. Discard an interrupted owned Action with an interrupted task outcome rather than publishing its earlier waiting response as success. Stop only nested work belonging to that logical task.

Carry-Group: incubator
Carry-Fix: #482
Carry-Reason: Action disposal and attribution complete the same-task continuation ownership change in Incubator.

Co-Authored-By: OpenAI Codex <[email protected]>
Use the shared task-round progress calculation in MCP status so nested work remains waiting for children. Report a remote interrupted task as interrupted instead of returning an obsolete assistant waiting reply.

Carry-Group: incubator
Carry-Fix: #482
Carry-Reason: Completes the existing same-task Action ownership change and its remote result delivery.

Co-Authored-By: OpenAI Codex <[email protected]>
Stopping a child that already ended its provider turn must end its outstanding Action task as interrupted. Dispose the waiting fence with that outcome so the parent cannot receive the obsolete waiting reply as success. Preserve completed earlier rounds.

Carry-Group: incubator
Carry-Fix: #482
Carry-Reason: Completes Stop handling for the same-task Action ownership change in Incubator.

Co-Authored-By: OpenAI Codex <[email protected]>
Use the current active-run predicate when disposing a remote delegated task. Its run-state meaning matches the replaced helper.

Carry-Group: incubator
Carry-Fix: #482
Carry-Reason: Integrates the same-task Action ownership change with the current orchestration helpers.

Co-Authored-By: OpenAI Codex <[email protected]>
Wait for nested and owner task results through the existing locked recovery service before checking that a rejected ancestor deletion changes no state. Preserve the no-event and archive-stopping assertions without sleeps or polling.

Carry-Group: incubator
Carry-Fix: #482
Carry-Reason: Keeps archive integration coverage deterministic with delegated Action ownership finalization.

Co-Authored-By: OpenAI Codex <[email protected]>
Include the latest owned run in remote disposal when provider background work remains after foreground completion. Load only unfinished background items and reuse the existing interrupt path. Keep app-owned descendant cancellation scoped separately and preserve unrelated later rounds.

Carry-Group: incubator
Carry-Fix: #482
Carry-Reason: Completes cancellation for remote delegated Action work and its provider-owned background tasks.

Co-Authored-By: OpenAI Codex <[email protected]>
Treat terminal never-started runs as results inside their explicitly owned local or remote task scope. Exclude unstarted runs from shared provider background ownership and cancellation. Preserve ordinary thread result selection. Extend existing follow-up and remote protocol cases through queued cancellation, independent result delivery, a parent wake and unrelated background preservation.

Carry-Group: incubator
Carry-Fix: #482
Carry-Reason: Completes finalization for queued later task rounds under same-task Action ownership.

Co-Authored-By: OpenAI Codex <[email protected]>
lastobelus and others added 2 commits October 31, 2026 18:20
Interrupt the exact delegated task when shutdown disposes its Action instead of recovering an intermediate waiting response as success. Admit remote activation through the common update-drain boundary before taking dispatch locks. Extend existing integration coverage for original, later and remote shutdown recovery, drain refusal, the activation claim race and receipt replay.

Carry-Group: incubator
Carry-Fix: #482
Carry-Reason: Keeps same-task Action ownership correct through shutdown and remote execution admission.

Co-Authored-By: OpenAI Codex <[email protected]>
Separate scroll/zoom/fit-width restoration from first-page zoom and different-file reset. The original case reached its existing test deadline during its fourth document load in Web CI. Preserve all state assertions and the existing deadline while bounding each case's real PDF worker startups.

Carry-Group: upstream-bugfixes
Carry-Fix: #555
Carry-Upstream: https://redirect.github.com/pingdotgg/t3code/pull/25555 at 78f1ba8
Carry-Observation: Repeated PDF loads shared one test deadline; the split preserves the upstream behavior coverage.

Co-Authored-By: OpenAI Codex <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 7eaff77765

ℹ️ 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 force-pushed the lastcode/child-action-continuations branch from 7eaff77 to 9ef44f5 Compare November 1, 2026 01:31
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 9ef44f5f76

ℹ️ 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 merged commit 58ca26e into lastcode/main Nov 1, 2026
23 of 38 checks passed
@lastobelus
lastobelus deleted the lastcode/child-action-continuations branch November 1, 2026 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-context-increase Intentional agent context growth approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant