fix(t3code): nest the instance home path under config - #2861
Conversation
T3 Code's ProviderInstanceConfig schema has no top-level homePath: the codex and claude drivers read it from the opaque config blob. Keeping it at the top level lets T3 drop it on its next settings write, so both CLIProxy instances fall back to the login-backed default home. Codex then reports the stale subscription credential as logged out instead of using the seeded CLIProxy auth record.
|
Warning This organization's free trial has ended, so Indent couldn't start this review. Manage billing to resume reviews on this repository. |
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
✅ No new issues found.
Summary
Issue: T3 Code on Kamino workers was repeatedly reporting "Your access token could not be refreshed" during codex-cliproxy turns.
Root Cause: T3 Code's ProviderInstanceConfig schema strips unknown top-level keys when rewriting settings.json. The drivers (codex and claude) read homePath from the opaque config blob. Because homePath was at the top level, T3's decode silently dropped it, causing both CLIProxy instances to fall back to the login-backed default home (~/.codex) and never use the seeded ~/.codex-t3/cliproxy/auth.json credentials.
Fix: Move homePath inside each instance's config object in config/t3code/server-settings.json. The jq merge in activate-settings.sh uses recursive *, preserving nested keys. The drivers then correctly read config.homePath.
Changes:
config/t3code/server-settings.json: moveshomePathintoconfigfor bothclaude-cliproxyandcodex-cliproxyinstancesspec/t3code_spec.sh: adds 2 tests — one verifyingconfig.homePathcarries correct values, one verifying no top-levelhomePathexists
Verification: Confirmed on all 4 Kamino hosts that the top-level homePath was being stripped by T3, and the fix ensures it survives the merge.
openrouter/openrouter/free | 𝕏

Problem
T3 Code on Kamino workers reports, on every
codex-cliproxyturn:Root cause
T3 Code's
ProviderInstanceConfigschema is:There is no top-level
homePath. Both drivers read it from the opaqueconfigblob:codexConfig.homePath ? { CODEX_HOME: expandHomePath(codexConfig.homePath) } : {}resolveClaudeHomePath(config)->CLAUDE_CONFIG_DIR...and fall back to the login-backed default home when it is empty:
config/t3code/server-settings.jsondeclaredhomePathat the top level of eachinstance. T3 decodes the merged file, drops the unknown key, and rewrites
~/.t3/userdata/settings.jsonwithout it. The CLIProxy instance then runs against~/.codex, whose stale ChatGPT subscription credential cannot be refreshed, and theseeded
~/.codex-t3/cliproxy/auth.jsonis never used.Confirmed on all four Kamino hosts: after T3's rewrite at 07:11 the top-level
homePathwas gone fromsettings.json.Fix
Move
homePathinto each instance'sconfigobject. The merge inactivate-settings.shuses jq's recursive*, so nested keys are preserved andsurvive T3's schema decode.
Verification
shellspec spec/t3code_spec.sh-> 14 examples, 0 failures (2 new).config.homePathfor both instances andT3's schema strip no longer removes it.
homeConfigurations.kamino4...t3codeSettingscarries the new template.The pre-existing 12 failures in
spec/t3_connect_spec.share unchanged by thischange (identical with the fix stashed).
Summary by cubic
Fixes T3 Code on Kamino workers repeatedly reporting "Your access token could not be refreshed," by moving the instance home path under each instance's
configblob.homePath, so T3 dropped the key when rewriting settings and both CLIProxy instances fell back to the login-backed default home (~/.codex), never using the seeded CLIProxy auth credential.config,homePathsurvives T3's decode since the settings merge uses jq's recursive*.config.homePathand the absence of a top-levelhomePath.Written for commit 9fba9cd. Summary will update on new commits.