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.
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.
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.
/ 01 · SECTION
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 Max | Primary application development: implementation, code changes, debugging, and tests that depend on continuous project context. |
|---|---|
| ChatGPT Pro | Independent 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.
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.
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.
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.
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.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+
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
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
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
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
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
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
/ 02 · SECTION
Verified environment
| Operating system | Windows |
|---|---|
| Shell | PowerShell |
| Claude Code | 2.1.260 |
| Codex CLI | 0.153.0 or newer · Astra minimum |
| Bridge | codex-for-claude-code 0.2.6 (current repository version) |
| Authentication | ChatGPT OAuth through Codex CLI |
| Local proxy | http://127.0.0.1:3099 |
| Selected model | gpt-6-astra · official OpenAI model ID |
| Imported session | Approximately 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.
/ 03 · SECTION
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 loginYou can also launch Codex once:
codexChoose 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 --versionThe bridge requires Node.js 20 or later, Claude Code, and a logged-in Codex CLI.
npm install -g codex-for-claude-code@latestThe normal launch command is:
claude-codex3. 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-codexA 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.
/ 04 · SECTION
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
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-astraAfter launching it this way, the picker displayed:
gpt-6-astra Custom model/ 05 · SECTION
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-codexThe 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.

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.
/ 06 · SECTION
Safely copying one session
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, LengthMy 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-Null3. 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
This creates a point-in-time copy, not live synchronization. Standard Claude Code and the bridge will develop separate histories after the copy.
/ 07 · SECTION
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 $sessionIdThe session opened. Running /status showed the essential evidence:
Session kind: interactive
Anthropic base URL: http://127.0.0.1:3099
Model: gpt-6-astraBefore 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.
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.
/ 08 · SECTION
Warnings and limitations
1. Outdated permission rule syntax
Write(~/.ssh/**) is not matched by file permission checks
Use Edit(~/.ssh/**) insteadThe 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 missingThe 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 performanceThe project instruction file exceeded the recommended size threshold. The session still launched, but a large instruction payload can affect latency and context consumption.
/ 09 · SECTION
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>"/ 10 · SECTION
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.
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 /statusWhen 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.
/ 11 · SECTION
References
- codex-for-claude-code on GitHub
- Claude Code CLI reference
- Claude Code model configuration
- OpenAI Codex authentication
- Using Codex with a ChatGPT plan
- OpenAI: GPT-6 Astra model specification
- OpenAI: ChatGPT Work and Codex · Astra CLI requirement
- Anthropic: What is the Max plan?
- Anthropic: Usage credits for paid plans