← Back to Pull requests

fix(codex): a pod-less Codex seat's restore keeps its git dirs writable, so it can still commit #2023

Closed
unknown closed this pull request without merging on Oct 25, 2026 16:26 UTC
View on GitHub
unknown unknown commented on Oct 25, 2026 12:59 UTC
Author

What this changes

A pod-less Codex seat restored through CodexResumeAdapter (by rig up --existing, or a restore after a reboot) now gets the same git metadata --add-dirs that #2000 gave its fresh, resume and fork launches, so it can still commit in its worktree. Seats in a pod restore through the launch adapter, which #2000 already fixed.

CodexResumeAdapter, which serves only seats without a pod, added none of them. A default workspace-write seat restored that way couldn't write its worktree's .git, and commits failed, which is the bug #2000 fixed for the other launch paths.

How


  • The same resolver (resolveCodexGitAddDirs), wired in at startup:

  • - an ordinary repository gets <cwd>/.git;
    - a linked worktree gets its worktree and common git dirs, never the .git file.
  • After the conversation id, with the git dirs first and then the seat folder (#2018), so the resume proof still reads the id when a path has a space.

  • Only on the plain workspace-write floor, the same rule as the seat folder. A named profile isn't checked for read-only on this path, and Codex refuses a writable root under a read-only sandbox.

  • Rebuilds and the launch adapter are untouched.
  • Tests


  • The restore path with real temporary repositories:

  • - an ordinary repository's restore adds <cwd>/.git, the same as its fresh launch, after the id, and the id still parses from a path with a space;
    - a linked worktree's restore adds its worktree and common git dirs, never the .git file.
  • The restore command's order and floor: git dirs, then the seat folder, after the id on the plain floor. A named profile gets none, and the resolver isn't called.
  • 🤖 Generated with Claude Code

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    Bug Fixes
    Resuming a conversation in a standard workspace now includes the relevant Git directories, helping preserve Git access. This also works with linked worktrees and paths containing spaces.
    * Resumes using a named profile remain unchanged and do not add these directories.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 283 lines (+212 / -71) across 3 files Reviewer: openrig-review Review duration: 207m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 283 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.338
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #2023"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.7% (MEDIUM) · Higher = larger blast radius
    39.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.7% · Safe to merge
    15.7%