Skip to content

fix(agents): stop linked-environment tasks stalling on approvals - #571

Merged
lastobelus merged 3 commits into
lastcode/mainfrom
lastcode/cross-environment-thread-approval-stalls
Nov 2, 2026
Merged

lastobelus merged 3 commits into
lastcode/mainfrom
lastcode/cross-environment-thread-approval-stalls

Conversation

@lastobelus

@lastobelus lastobelus commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Problem

Work delegated to a trusted linked environment could stop on a routine approval prompt, and the sender kept showing it as working. Nobody was told, so unattended tasks sat stalled.

Two causes:

  • Wrong default mode. Owned remote launches took the destination project's default mode, not the caller's. A parent on Full access still spawned a child that asked for approval.
  • Invisible waits. A genuine approval or question on the remote side never reached the sender, so the stall looked like progress.

What changed

  • Full access by default. New environment links default to Full access, on shared web/mobile and in Settings.
  • Mode inheritance. Remote owned launches inherit the caller's effective mode, not the destination project's default.
  • Visible waits. Genuine remote approvals and questions now show as a waiting status on the sender, with one deduplicated notification linking to the receiving thread.
  • Clean clearing. Answering, clearing, or completing a request cancels any stale queued notices.
  • Continuations. Continuing after an answer keeps task ownership, so a later completion still wakes the sender.
  • Distinct questions. Question IDs now tell successive requests apart, so a second prompt is not mistaken for the first.
  • Cheaper output events. Output events no longer read interaction history.

Validation

  • Tests. 119 focused tests passed. check:changed passed all 323 changed-file tests, plus affected typechecks, lint, knip, and the React compiler check. New regression assertions failed before the fixes.
  • Quick CI. Passed on the prior head (292ed07173). The final 19-line adjustment passed the focused tests and the changed-file gate; Quick CI was not rerun on the exact final head.
  • Browser. Isolated before/after captures verify the link default.
  • Not run. Live model replay. The replay schema dry-run passed.

Browser evidence

Before After
New links defaulted to Supervised New links default to Full access

Review

Two GPT-6.1 Terra reviews at xhigh effort. All findings from both were addressed. The last medium finding was fixed after the second review, with a regression test that failed before the fix and passes after. That final fix was not reviewed again.

Agent context

The MCP input schema grows by 481 bytes to carry observed remote interaction state. The PR carries the agent-context-increase label.

Implemented with GPT-6.1 Sol in the Codex harness; reviewed in two rounds with GPT-6.1 Terra at xhigh effort. Notification copy received a Claude Opus 5.5 writing pass.

New machine links default to full access, remote launches inherit their effective caller mode, and remote approval waits reach the sender with a direct thread link.

Carry-Group: incubator

Carry-Observation: Keep permission inheritance and blocked-work reporting together to prevent unattended delegation from silently stalling.
Keep completion wakes armed after nonterminal waits, cancel obsolete queued notices, retain enclosing task ownership, and distinguish question changes without scanning provider output.

Carry-Group: incubator

Carry-Observation: Remote blocked-work notifications remain part of their original delegated task and expire when that interaction ends.
Preserve each notice and its run association when question state changes while the same approval remains pending.

Carry-Group: incubator
@lastobelus lastobelus added the agent-context-increase Intentional agent context growth approved by a maintainer label Nov 2, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 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-02T05:19:02.258158Z b4bed75 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

Copy link
Copy Markdown
Owner Author

@codex review

@lastobelus lastobelus changed the title fix(agents): keep cross-environment delegation moving fix(agents): stop linked-environment tasks stalling on approvals Nov 2, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: b4bed7536a

ℹ️ 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 7ac384a into lastcode/main Nov 2, 2026
27 of 40 checks passed
@lastobelus
lastobelus deleted the lastcode/cross-environment-thread-approval-stalls branch November 2, 2026 05:37
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