openai / openai/codex

Optional persistent Codex session per GitHub pull request

Open
#45,285 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

code-review codex-web enhancement session
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 @codex comments 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.

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.