Skip to content

[Codex Cloud] Fresh tasks repeatedly start at stale repository HEAD after main advances #61655

Open

Description

@TohruArahashi

What issue are you seeing?

New Codex Cloud tasks using an existing published Cloud environment repeatedly start from an outdated Git commit, even after the repository's default main branch has advanced and the new commit is visible through the GitHub API.

This is about the actual checked-out HEAD, not merely a stale diff counter or remote-tracking comparison.

Observed on 2026-11-15 (JST) in the Codex Cloud experience accessed from Windows desktop / ChatGPT web. The affected GitHub repository is private; repository/account identifiers, exact commit hashes, environment IDs, and task URLs are intentionally omitted from this public report.

  • A pull request was successfully merged into GitHub main (one existing AGENTS.md file changed, 40 additions, 0 deletions).
  • Independent GitHub API checks confirmed that live main had advanced from commit A to commit B.
  • Multiple new, separate Cloud tasks launched with the same published repository environment continued to show HEAD=A on the Cloud task's work branch, with git status clean.
  • In an affected task, only refs/heads/work was found in the local refs listing; a normal local main / remote-tracking ref was not present in that task.
  • Read-only inspection consistently reproduced the stale checkout. No local edits or uncommitted changes caused the mismatch.
  • Explicitly fetching the latest remote main and fast-forwarding the individual task workspace succeeded, producing HEAD=B and showing the expected 40-line update.
  • Yet another brand-new task from the same published Cloud environment again started at HEAD=A. Updating a task does not update the baseline for subsequent tasks.

The environment was already published and linked to the correct repository. The repository's GitHub default branch is main; no GitHub main-side failure was observed.

What steps can reproduce the bug?

  1. Connect a private GitHub repository with a main branch to a published Codex Cloud environment.
  2. Note an existing Cloud task's HEAD=A.
  3. Merge a small change into GitHub main, yielding B (where A is an ancestor of B).
  4. Independently verify that GitHub's live main points to B.
  5. Create a new Cloud task explicitly choosing the already-published environment. Run read-only:
    git rev-parse HEAD
    git branch --show-current
    git status --porcelain=v1
    git show-ref
    Actual: HEAD=A, branch work, clean tree; no updated main remote-tracking reference.
  6. In that task only, after confirming clean state and ancestor relationship, explicitly run:
    git fetch --no-tags origin refs/heads/main
    git rev-parse FETCH_HEAD
    git merge --ff-only FETCH_HEAD
    git rev-parse HEAD
    Result: the fetch/fast-forward succeeds and local task HEAD=B.
  7. Create another separate Cloud task with the same environment and inspect HEAD before any fetch. Actual: it starts again at A.

The above mismatch was reproduced on more than one newly created task. Running Git operations within one task was not found to persist updates to subsequent tasks.

What is the expected behavior?

A newly created Cloud task for a repository-backed environment should use a current, appropriately selected base revision from the requested GitHub branch (or clearly disclose the cached revision and offer a supported refresh / rebase mechanism). At minimum, users should not unknowingly begin development against an old commit when the selected repository's main has already advanced.

Additional information

Activity

  1. added
    bug
    codex-web
    session
    on Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcodex-websession

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions