Skip to content

feat(agents): make Action waits inspectable and guide parent handoffs - #509

Merged
lastobelus merged 3 commits into
lastcode/mainfrom
lastcode/child-action-inspection-phase1
Oct 26, 2026
Merged

lastobelus merged 3 commits into
lastcode/mainfrom
lastcode/child-action-inspection-phase1

Conversation

@lastobelus

@lastobelus lastobelus commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Problem

A delegated child task that launches a resumable Action (dependency prep, CI, a build, a checkpoint wait) and ends its turn to wait can be treated as finished before the Action returns. The parent then has no reliable way to tell "child done" from "child waiting on an Action", and resumed child work may finish without delivering its final result to the parent. App-owned child tasks don't yet complete reliably across an Action wait; fixing that properly (same-task continuation) is Phase 3 of #482.

This PR is Phase 1. It doesn't fix the child's lifecycle. It makes the wait visible and gives parents one handoff procedure to use until Phase 3 lands.

What changed

  • Inspectable status. t3_thread_read now returns a bounded summary of the thread's latest Action and the read-only autoSettleDisabledAt setting. The summary's status comes from the current pause and the matching follow-up run (for example pending_delivery, follow_up_queued, follow_up_active, attention_required). Accepted delivery is never reported as completed work. Raw command output stays restricted to the launching thread through inspect_action_run.
  • Parent mediation. The injected runtime and orchestration instructions now tell a child to end its turn with a handoff request as its final response. The parent then:
    1. waits for that recorded result,
    2. protects itself from automatic settlement,
    3. verifies the target checkout,
    4. runs the Action,
    5. queues one tracked return to the child with a taskId receipt.
  • Runbook. docs/internals/resumable-project-actions-setup.md gains a "Parent-mediated Actions for delegated children" section: choosing the target, settlement protection, observing progress, and when the handoff ends.
  • Instruction sync. Recorded provider instruction fixtures (Grok and Muse transcripts) are updated mechanically to match the new text.
  • Reused unchanged. The final fix(server): deliver delegated children's background command results to the parent #484 background-result repair.

Not in this PR

  • Phase 3, same-task ownership. A child still can't own its Action across the wait. Until Phase 3 ships and passes acceptance on an installed checkpoint, parents own every resumable Action a delegated child needs. Child PR watches stay with the parent until Phase 4 is installed and accepted. A newer source tree or version number does not lift either restriction.
  • Delegated tasks finish before resumable Action continuations complete #482 stays open. It holds the four-phase plan and the post-checkpoint acceptance record.

Validation

  • Quick CI passed for 428bca5ec9bfd3b4d4a7dfb62796df11c8203789 on base ba9dfa98ef5e16536d689dca454486b01a66ea71.
  • Changed-file checks passed, including 171 tests. Eight provider instruction/replay suites passed 369 tests, and 20 additional toolkit tests passed.
  • Astra High and Opus 5.5 High implementation reviews are clean.

Still pending: installed acceptance and representative real use, after this merges and the current in-flight checkpoint finishes. No build, install, restart or checkpoint is started here.

Implemented with GPT-6.1 Sol through Codex, with Astra High and Claude Opus 5.5 High review and guidance writing.

Expose bounded latest-Action metadata and read-only settlement protection in
thread reads. Derive current delivery status without treating historical pause
intent or an accepted follow-up as completed work. Keep raw output scoped to
the launching thread.

Guide delegated children through final-response handoffs and explicit queued
parent returns. Reuse the existing background-result repair; same-task Action
ownership remains separate. Synchronize embedded provider instructions in
recorded replay fixtures without re-recording their events.

Carry-Group: incubator
Carry-Fix: #482
Carry-Observation: Agent-facing inspection and mediation integrate Incubator app-owned read contracts, pause and settlement state; the contracts, injected guidance and replay evidence form one feature without changing core Action execution or the existing background-result repair.
Supply the new read service in the toolkit integration and core test layers.

Carry-Group: incubator
Carry-Fix: #482
Carry-Observation: The toolkit fixtures construct the agent-facing metadata service and need its existing Action inspection dependency; runtime behavior is unchanged.
Keep the child PR-watch condition intact when describing Action mediation.
Reuse existing parent settlement protection once per workflow, restore only
settings changed by that workflow, and describe the actual read surfaces.

Carry-Group: incubator
Carry-Fix: #482
Carry-Observation: These corrections preserve Phase 1 agent guidance without changing Action execution, task ownership, or PR-watch permission.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 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-10-26T04:39:45.221689Z 428bca5 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.

@lastobelus lastobelus changed the title feat(agents): inspect Action waits and guide parent handoffs feat(agents): make Action waits inspectable and guide parent handoffs Oct 26, 2026
@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: 428bca5ec9

ℹ️ 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 bea65a3 into lastcode/main Oct 26, 2026
21 of 36 checks passed
@lastobelus
lastobelus deleted the lastcode/child-action-inspection-phase1 branch October 26, 2026 04:50
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.

1 participant