Skip to content

Hand off approved plans through attachments in fresh sessions - #60763

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/b717f30359256994c6efb3f4fe7f87aabe8936af
Nov 11, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/b717f30359256994c6efb3f4fe7f87aabe8936af

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Hand off approved plans through attachments in fresh sessions

What changed

Make “Yes, clear context and implement” save the approved plan as an app-server attachment and submit a short prompt referencing it. Add the experimental thread/prepareApprovedPlan request to verify that the fresh thread's executor can read the file and that its contents match the approved plan.

If the attachment cannot be written or read, inject the complete plan as proposed_plan tool output within the model's context and truncation limits. If the complete plan cannot fit, report an error and keep the current session. Clear the UI and switch threads only after plan preparation succeeds.

Testing

Add TUI tests covering a large plan read from its attachment, complete fallback context when attachment writes or reads fail, and preservation of the original session when the fallback is too large. Snapshot the fresh thread's initial request.

## What changed

Make “Yes, clear context and implement” save the approved plan as an app-server attachment and submit a short prompt referencing it. Add the experimental `thread/prepareApprovedPlan` request to verify that the fresh thread's executor can read the file and that its contents match the approved plan.

If the attachment cannot be written or read, inject the complete plan as `proposed_plan` tool output within the model's context and truncation limits. If the complete plan cannot fit, report an error and keep the current session. Clear the UI and switch threads only after plan preparation succeeds.

## Testing

Add TUI tests covering a large plan read from its attachment, complete fallback context when attachment writes or reads fail, and preservation of the original session when the fallback is too large. Snapshot the fresh thread's initial request.

GitOrigin-RevId: b717f30359256994c6efb3f4fe7f87aabe8936af
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/b717f30359256994c6efb3f4fe7f87aabe8936af branch from a5cb8af to 3a89580 Compare November 11, 2026 09:01
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor
Codex Review Summary: 🔄 Running

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

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-11T09:01:27.707551Z a5cb8af PR opened
ℹ️ 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.

@copyberry
copyberry Bot merged commit 3a89580 into main Nov 11, 2026
8 of 23 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/b717f30359256994c6efb3f4fe7f87aabe8936af branch November 11, 2026 09:01
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 11, 2026

This branch was previously deployed

1 inactive deployment
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants