Windows · Claude Code · Codex CLI

Use GPT-6 Astra in Claude Code on Windows: A Follow-Along Guide for Preserving Sessions

My goal sounded simple: keep the Claude Code interface and the context accumulated in a long-running session, while routing the work through the latest GPT-6 Astra model using ChatGPT-authenticated Codex access.

Topic · AI Development Tools / Development EnvironmentEnvironment · Windows · PowerShellFormat · Hands-on setup note

The installation itself was not the hardest part. Claude Code binary detection, a stale model picker, isolated configuration directories, and an invisible 303 MB session transcript all became separate problems.

ASTRA REVISION The original session-recovery test was completed with GPT-5.6 Sol. This revision updates the runnable path to OpenAI’s current Astra model ID, gpt-6-astra, and the current Codex CLI requirement. Because the bridge is third-party, the success criterion below is an actual Astra response plus verification in /status.
Claude Code
Local Proxy
Codex OAuth
GPT-6 Astra

Why I considered this setup

I currently subscribe to both Claude Code Max and ChatGPT Pro while developing an application. The two services already had distinct roles in my workflow.

Claude Code MaxPrimary application development: implementation, code changes, debugging, and tests that depend on continuous project context.
ChatGPT ProIndependent external review and Codex PR Auto Review.

The combination worked well until the intensity of development increased. My Claude Code weekly allowance was regularly exhausted by Thursday.

I tried purchasing additional usage credits so that development could continue. However, USD 400 in extra credits was consumed in roughly one day. The issue was no longer an occasional overage. Both the cost and the interruption to the main development flow had become unsustainable.

Why could $400 disappear faster than a $200 Max subscription?

The two amounts do not purchase usage in the same way. Anthropic describes Max 20x as providing 20 times the usage of Pro within each five-hour usage window. Extra usage credits, on the other hand, are consumed at standard API rates after the included plan allowance is exhausted.

“Five-hour window” does not mean only five usable hours per day Claude remains available throughout the day. The short-term allowance resets in five-hour windows, and the Max 20x allowance within each window is 20 times the Pro allowance. A separate weekly cap sits above those windows, however. Intensive Claude Code use can therefore exhaust the weekly cap even though another five-hour window has reset.

Anthropic does not publish the included Max allowance as a fixed token quantity or an equivalent API-dollar balance. It is therefore not possible to calculate what exact percentage of a Max allowance $400 in usage credits represents. The meaningful observation from my own workload was simpler: the weekly Max allowance was gone by Thursday, and another $400 lasted about one more day.

Would two Max 20x subscriptions solve it?

In terms of capacity, that looked close to what my workload needed. The obvious solution would have been to combine two Max 20x allowances in the same development workflow.

That was not practical in my setup. There was no way to stack two Max 20x subscription allowances inside one Claude Code account and the same long-running session. Using a separate account would separate authentication and session history, defeating the requirement that mattered most: preserving context.

The real problem was not switching models Product rules, earlier decisions, review results, and the current implementation state had accumulated inside one long Claude Code session. Starting a blank conversation elsewhere would require another handover and another verification cycle. I needed a way to retain that session while using the model capacity already available through ChatGPT Pro.
Could I keep the existing Claude Code session and interface, but use a Codex model through my ChatGPT subscription after the Claude Max weekly allowance ran out?

That question led to the experiment documented below.

FOLLOW ALONG · QUICK START

The exact order to follow

If you want to reproduce the setup, scan these seven steps once before typing commands. If you do not need an existing Claude Code session, skip step 06. Do not advance until the pass condition under each step is satisfied.

September 2026 Astra baseline: OpenAI’s official model ID is gpt-6-astra, and Astra in Codex requires Codex CLI 0.153.0 or newer. The bridge in this article is a third-party project, not an official OpenAI/Anthropic integration, so final verification must include an actual successful model response.
01

Check versions

Verify Node.js, Claude Code, and Codex CLI first. Astra requires Codex CLI 0.153.0 or newer.

node --version
claude --version
codex --version

Pass condition · Node.js 20+ and Codex CLI 0.153.0+

02

Sign in to Codex with ChatGPT

This path uses Codex CLI OAuth, not an OpenAI API key entered into the bridge.

codex login

If you get 401 · run codex once to refresh OAuth, then retry

03

Install the bridge

Install the third-party codex-for-claude-code bridge used by this article.

npm install -g codex-for-claude-code@latest

Pass condition · the claude-codex command is available

04

Launch Astra from the project directory

Do not depend on the model picker. Pass the official Astra model ID directly.

cd C:\path\to\your-project
claude-codex --model gpt-6-astra

Pass condition · Claude Code opens and requests route through 127.0.0.1:3099

05

Only if Claude Code binary detection fails

Set the executable path only when you see Could not find Claude Code binary.

$env:CLAUDE_CODEX_CLAUDE_BIN="$HOME\.local\bin\claude.exe"
claude-codex --model gpt-6-astra

No binary error · skip this step

06

Only when you need an old session

If /resume already shows the session, select it. Copy a transcript only when the bridge cannot see it.

/resume

Important · copy only the required JSONL; do not overwrite ~/.claude

07

Verify the active route and model

After opening the session, run /status and then execute one small real task.

/status

Check · Anthropic base URL = http://127.0.0.1:3099 · Model = gpt-6-astra

Verified environment

Operating systemWindows
ShellPowerShell
Claude Code2.1.260
Codex CLI0.153.0 or newer · Astra minimum
Bridgecodex-for-claude-code 0.2.6 (current repository version)
AuthenticationChatGPT OAuth through Codex CLI
Local proxyhttp://127.0.0.1:3099
Selected modelgpt-6-astra · official OpenAI model ID
Imported sessionApproximately 303 MB of JSONL

OpenAI documents two authentication paths for local Codex work: signing in with ChatGPT for subscription access, or using an API key for usage-based access. This experiment used the first path. Usage limits still depend on the subscribed ChatGPT plan.

Codex authentication and bridge installation

I initially considered broader routing solutions such as OmniRoute and LiteLLM. My requirement was narrower: preserve the Claude Code experience, reuse an existing Codex CLI login, and avoid moving this workload to a separate API-key billing path.

codex-for-claude-code was the most direct match. It is important to note that it is a third-party open-source bridge, not an official OpenAI or Anthropic integration.

1. Verify the Codex CLI login

codex login

You can also launch Codex once:

codex

Choose Sign in with ChatGPT during the login flow. If the bridge later returns 401 Unauthorized, the project README recommends launching Codex once to refresh the OAuth token before retrying.

2. Check the prerequisites and install the bridge

node --version
claude --version
codex --version

The bridge requires Node.js 20 or later, Claude Code, and a logged-in Codex CLI.

npm install -g codex-for-claude-code@latest

The normal launch command is:

claude-codex

3. Fix Claude Code binary detection on Windows

In my environment, the wrapper could not automatically locate the Claude Code executable. Setting its exact path solved the problem:

$env:CLAUDE_CODEX_CLAUDE_BIN="$HOME\.local\bin\claude.exe"

cd C:\path\to\your-project
claude-codex

A first-run theme screen appeared. This was not an error. The bridge uses an isolated Claude configuration directory, so it initially behaves like a fresh environment.

If Astra is missing from the model picker, pass it directly

After Claude Code opened, I ran /model. The bridge exposed several Codex options, but GPT-6 Astra was not among them.

Codex gpt-5.5
Codex gpt-5.4
Codex gpt-5.3-codex-spark
Codex gpt-5.4-mini
Codex gpt-5.3-mini

A Claude Code model picker that does not list GPT-6 Astra, requiring the model ID to be specified explicitly
The bridge’s built-in model picker did not yet match the models available in Codex CLI.

Claude Code supports selecting a model by its full name with --model. With a custom ANTHROPIC_BASE_URL or LLM gateway, the gateway can define the model identifiers that Claude Code passes through.

claude-codex --model gpt-6-astra

After launching it this way, the picker displayed:

gpt-6-astra    Custom model

The larger problem: my existing session was missing

I ran /resume to reopen my long-running development session. Only the bridge test sessions appeared.

The reason was configuration isolation:

Standard Claude Code: ~/.claude
Bridge environment:   ~/.claude-codex

The bridge uses a separate CLAUDE_CONFIG_DIR so its Codex model-picker state does not leak into normal Claude Code windows. Its README describes shared configuration assets, but the existing transcript did not appear automatically in my Windows environment.

Diagram showing Claude Code requests passing through a local Windows proxy before reaching a Codex model
The bridge translates requests through a local proxy on port 3099.

Direct resume by session ID also failed

I obtained the original UUID from /status in standard Claude Code and tried:

claude-codex `
  --model gpt-6-astra `
  --resume <SESSION_UUID>

The result was:

No conversation found with session ID: <SESSION_UUID>

The UUID was valid. Its JSONL transcript existed under ~/.claude, but not under the configuration tree used by the bridge.

Safely copying one session

Security warning A session JSONL file can contain conversation history and tool activity. Do not upload or share it. Avoid replacing the entire configuration tree; copy only the session you need and preserve the original.

1. Locate the transcript

$sessionId = "<SESSION_UUID>"

$src = Get-ChildItem "$HOME\.claude\projects" -Recurse -File |
  Where-Object { $_.Name -eq "$sessionId.jsonl" } |
  Select-Object -First 1

$src | Select-Object FullName, Length

My transcript was approximately 303 MB.

2. Create the matching destination directory

if (-not $src) {
  throw "Session file not found: $sessionId"
}

$projectDirName = Split-Path $src.DirectoryName -Leaf
$dstDir = Join-Path `
  "$HOME\.claude-codex\projects" `
  $projectDirName

New-Item -ItemType Directory -Force -Path $dstDir |
  Out-Null

3. Copy and verify the file

$dst = Join-Path $dstDir $src.Name

Copy-Item `
  -LiteralPath $src.FullName `
  -Destination $dst

Get-Item $src.FullName, $dst |
  Select-Object FullName, Length

The original transcript stays untouched; only an isolated copy is created for the bridge environment.
I preserved the original transcript and created only an isolated copy for the bridge environment.
This creates a point-in-time copy, not live synchronization. Standard Claude Code and the bridge will develop separate histories after the copy.

Launch GPT-6 Astra with the copied session

$env:CLAUDE_CODEX_CLAUDE_BIN="$HOME\.local\bin\claude.exe"

cd C:\path\to\your-project

claude-codex `
  --model "gpt-6-astra" `
  --resume $sessionId

The session opened. Running /status showed the essential evidence:

Session kind:       interactive
Anthropic base URL: http://127.0.0.1:3099
Model:              gpt-6-astra

Before publishing screenshots: redact email addresses, Windows usernames, sensitive repository paths, and the real session UUID.

Why this guide does not append [1m] to Astra

OpenAI lists a 1.05M-token context window for GPT-6 Astra. However, the current codex-for-claude-code 0.2.6 source does not explicitly register Astra in its context-window table, and its README does not document an Astra-specific [1m] suffix path.

Use the official model ID in copy/paste commands This revision therefore uses gpt-6-astra exactly. Claude Code’s local HUD or compaction display may not reflect the full 1.05M window through this bridge, but inventing an undocumented suffix is less defensible than using the official upstream model ID. Add a context hint only after the bridge explicitly documents it or you independently validate it for Astra.

How this differs from API-key billing

OpenAI distinguishes ChatGPT subscription authentication from API-key, usage-based access. This setup used the OAuth credentials created by Codex CLI; I did not enter a separate OpenAI API key into the bridge.

That does not mean unlimited free usage. The usage limits attached to the ChatGPT plan still apply, and this third-party bridge is not an officially supported integration.

Warnings and limitations

1. Outdated permission rule syntax

Write(~/.ssh/**) is not matched by file permission checks
Use Edit(~/.ssh/**) instead

The warning indicated that the current Claude Code version expected Edit(path) for file-change permission rules. It did not block startup, but a non-matching protection rule should not be ignored.

2. Missing agents target

agents target missing

The shared agents directory did not exist. This was non-blocking because I was not relying on custom agent definitions in this test.

3. Large CLAUDE.md

Large CLAUDE.md will impact performance

The project instruction file exceeded the recommended size threshold. The session still launched, but a large instruction payload can affect latency and context consumption.

The command I use now

The copied transcript already exists under ~/.claude-codex, so it does not need to be recopied for each launch.

$env:CLAUDE_CODEX_CLAUDE_BIN="$HOME\.local\bin\claude.exe"

cd C:\path\to\your-project

claude-codex --model "gpt-6-astra"

Then use /resume to select the bridge-side session, or provide the UUID directly:

claude-codex `
  --model "gpt-6-astra" `
  --resume "<SESSION_UUID>"

Conclusion

What looked like a one-command model switch became a sequence of independent compatibility problems: executable detection, model catalog lag, configuration isolation, and session discovery.

✓ Kept the Claude Code interface
✓ Reused a copy of the long-running session
✓ Used ChatGPT OAuth through Codex CLI
✓ Passed the official GPT-6 Astra model ID directly
Model missing from picker
→ Pass it directly with --model

Existing session missing
→ Check ~/.claude versus ~/.claude-codex

Resume by UUID fails
→ Copy only the required JSONL transcript

Final verification
→ Check proxy URL and model in /status
When a tool claims model support or session interoperability, verify the real configuration path, transcript store, and active model in your own operating environment.

On this day, /status, one filesystem path, and a single error line told me more than the happy-path installation instructions.

References

EDITORIAL NOTE

Astra revision and official documentation rechecked on September 11, 2026. The original session-recovery run was performed with GPT-5.6 Sol; Astra model ID, context specification, and minimum Codex CLI version are updated from current OpenAI documentation. Third-party bridge compatibility still requires verification in the actual environment.

Scroll to Top