Skip to content

Preserve thread context when retrying or editing turns - #33211

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/4915d85ae1929a0b8c40f3ed7dca29c7a5bdcdf3
Jul 15, 2026
Merged

Preserve thread context when retrying or editing turns#33211
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/4915d85ae1929a0b8c40f3ed7dca29c7a5bdcdf3

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 15, 2026

Copy link
Copy Markdown

Preserve thread context when retrying or editing turns

What changed

  • Add experimental beforeTurnId support to thread/fork for copying history strictly before a turn, including an in-progress turn.
  • Use before-turn forks for TUI backtracking and safety retries so the replacement prompt retains thread context instead of recreating the branch from the preceding turn or a new thread.
  • Add experimental deferGoalContinuation support so safety-retry forks can inherit an active goal while waiting for the replacement turn before automatic continuation resumes.
  • Hide duplicated nested-review prompts when replaying history or selecting a prompt to edit.

Testing

  • Cover before-turn truncation, fork validation, active-goal inheritance, TUI safety retries, backtracking, and nested-review replay.

## What changed

- Add experimental `beforeTurnId` support to `thread/fork` for copying history strictly before a turn, including an in-progress turn.
- Use before-turn forks for TUI backtracking and safety retries so the replacement prompt retains thread context instead of recreating the branch from the preceding turn or a new thread.
- Add experimental `deferGoalContinuation` support so safety-retry forks can inherit an active goal while waiting for the replacement turn before automatic continuation resumes.
- Hide duplicated nested-review prompts when replaying history or selecting a prompt to edit.

## Testing

- Cover before-turn truncation, fork validation, active-goal inheritance, TUI safety retries, backtracking, and nested-review replay.

GitOrigin-RevId: 4915d85ae1929a0b8c40f3ed7dca29c7a5bdcdf3
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/4915d85ae1929a0b8c40f3ed7dca29c7a5bdcdf3 branch from ae586e8 to d88db19 Compare July 15, 2026 02:36
@copyberry
copyberry Bot merged commit d88db19 into main Jul 15, 2026
14 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/4915d85ae1929a0b8c40f3ed7dca29c7a5bdcdf3 branch July 15, 2026 02:37
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 15, 2026
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.

2 participants