Optional persistent Codex session per GitHub pull request
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What variant of Codex are you using?
Web – GitHub @codex PR review integration
What feature would you like to see?
Problem
Each new @codex mention on a pull request starts a new Codex task/session. During an iterative review cycle, this fragments context and creates repeated tasks.
Proposed feature
Add an optional “one persistent session per pull request” mode:
- Key the session by repository + PR number.
- Reuse the same Codex task for subsequent
@codexcomments on that PR. - Serialize concurrent events for the same PR and deduplicate repeated webhook/comment events.
- Refresh the PR head SHA, review threads, and CI status on each turn.
- Archive the task when the PR is closed or merged.
- Create a replacement only when the original session expires or is archived.
- Make the behavior configurable per repository/workspace, with an opt-out if needed.
Benefit
This would preserve context across review iterations, reduce duplicated setup and token overhead, and make the review → fix → re-review workflow more coherent.
Using the same comment thread or enabling Automatic reviews can help, but neither provides one persistent conversational task for the PR.
Additional information
Current behavior is reproducible when multiple @codex mentions are made on the same GitHub pull request: each mention appears as a separate Codex task.
Expected behavior is one reusable task per repository and PR, while still refreshing the current PR state on every follow-up.
A related discussion was opened here:
https://github.com/openai/codex/discussions/45284
This is a feature request, not a report of a repository-specific configuration problem.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the GitHub pull request comment or webhook handling and the existing Codex task lifecycle. Trace how repeated @codex mentions create tasks, then identify where repository and PR identity, current PR state, concurrency, and archival could be managed. Done means a configurable persistent session is reused per repository and PR, refreshed on each turn, and replaced only after expiry or archival.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github
- Domain
- backend-api-design, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100