[Bug]: Claude and Codex auth probes time out through mise shims; absolute executable paths restore authentication
Summary
On a Linux systemd user service, T3 reports installed Claude and Codex CLIs but cannot verify auth when launching them by name through mise shims. Configuring absolute paths to the underlying binaries immediately restores both providers to authenticated/ready, without restarting the service.
Environment
- Arch Linux / Omarchy, x86_64
- Running server:
0.0.46-nightly.20261005.2676, managed user service - Claude Code
2.1.289; Codex CLI0.160.0 - Service HOME and XDG_CONFIG_HOME match the logged-in user.
- Service PATH contains mise shims, resolving
claudeandcodexto symlinks to/usr/bin/mise.
Observed
Provider cache snapshots and trace timings:
- Claude: installed=true, version=null, auth=unknown;
Claude Agent CLI is installed but failed to run. Timed out while running command.Checks repeatedly last about 4 seconds. - Codex: installed=true, version=null, auth=unknown;
Timed out while checking Codex app-server provider status.Checks repeatedly last about 10 seconds.
Direct claude auth status reports loggedIn=true; codex login status reports logged in using ChatGPT. Running the shim executables with the running server process's environment and cwd in a separate Python subprocess completes both --version calls in about 0.03 seconds. This suggests a difference in T3's subprocess launch/collection path rather than absent credentials; the exact underlying shim interaction is not yet established.
Verified workaround
In the existing provider instances, set config.binaryPath to:
- Claude:
~/.local/share/mise/installs/claude/latest/claude(expanded absolute path) - Codex:
~/.local/share/mise/installs/codex/latest/bin/codex(expanded absolute path)
After the settings watcher refreshed providers, both caches changed to status=ready, auth=authenticated, with correct CLI versions and no error message. No restart or login was needed.
Expected
CLI names resolving through mise shims should work as they do in a direct subprocess. At minimum, provider diagnostics should distinguish launch/probe timeouts from missing authentication and suggest an explicit executable path.
Related
- #13635: failed auth probes can leave misleading cached states.
- #15781: Cursor SDK ignores existing CLI/SDK login. Cursor on this same Linux host is logged in according to
cursor-agent about --format json, but T3 reports unauthenticated. The explicit-path workaround applies only to Claude and Codex; Cursor is a separate existing issue.
No credentials or account identifiers are included in this report.
[!NOTE] Grok responding on behalf of Julius.
Triage
Thanks for the careful investigation, @vayllon301, especially the direct shim timing and the absolute-path check!
What I found
- This looks like a provider launch hang rather than a missing Claude or Codex login. The cached messages match the probe timeouts on nightly
0.0.46-nightly.20261005.2676(78122305) and currentmain(e22c880434); those probe files are unchanged between the two. - Claude:
installed=true,version=null, andTimed out while running commandis the--versionprobe hittingDEFAULT_TIMEOUT_MS(4s) incheckClaudeProviderStatus. That branch only runs once the process has started and not exited; a missingclaudewould be reported as not found on PATH. - Codex:
Timed out while checking Codex app-server provider statusis the wholecodex app-serverhandshake hittingAUTH_PROBE_TIMEOUT_MS(10s). The version comes from that handshake, so it stays null. The "not authenticated, run codex login" message is a separate branch. - On Linux both probes spawn the configured
binaryPathwithshell: false. The child-process spawner starts a new session (detacheddefaults on outside Windows) and leaves stdin as an open pipe nothing writes to or closes. Your ~30ms Python run used the same environment and cwd but not those spawn flags. - A likely cause is mise blocking before
execwhen stdin isn't a terminal and there's no controlling terminal (its trust/install prompts can wait on stdin or/dev/tty). For Codex that would also hold the JSON-RPC stdin, soapp-servernever starts. A less likely alternative on Omarchy is the~/.local/bin/claudebash stub (exec mise x -- claude) looping when~/.local/binis ahead of the shims, though you reported the names resolving to the shim. - Not a duplicate: #13635 is a capabilities warning after a probe that did return a version, and #15781 is the Cursor report, which doesn't use this spawn path.
If you have a moment, these would help narrow it down:
type -a claudeandtype -a codexfrom the service environment.- During a probe,
cat /proc/<child>/cmdlineandls -l /proc/<child>/fd/0to see whether it's a looping stub or mise blocked on the stdin pipe.
In the meantime, the absolute install paths you used are a working workaround.
Likely fix area
Options include making the one-shot probes not hold an open stdin (while codex app-server still needs its pipe), and making the timeout message say the probe timed out and point at the provider binary path setting, rather than leaving auth=unknown to read like a logged-out account.
A maintainer will decide on the fix direction.
On Omarchy, I can confirm it's the looping stub, not mise blocking on stdin.
Setup: Omarchy 4.0.4, t3code-bin 0.0.45 (Omarchy package), mise 2026.10.0, Linux 7.2.5.
~/.local/bin/{claude,codex,gh} are Omarchy omarchy-mise-install stubs:
mise use -g --quiet X || exit 1; exec mise x X -- X "$@".
What happens:
- The desktop app copies only
PATHfrom$SHELL -ilc(LOGIN_SHELL_ENV_NAMESinapps/desktopmain). It does not copy mise's activation state (__MISE_DIFF). - My rc puts
~/.local/binahead of the mise shims. - Without
__MISE_DIFF,mise xinserts the tool's bin dir where the shims entry sits, which is behind~/.local/bin. So the bareclauderesolves to the stub again, and the stub execs itself forever in the same PID.
Evidence:
- Under the server's own PATH (from
/proc/<t3 server pid>/environ), running the stub with</dev/nulland no TTY:claude --versiontimes out (rc=124 at 8s).MISE_DEBUG=1on the gh stub showsARGS: mise x gh -- gh --versionrepeating about 3 times a second. psshows one PID that is alive for minutes, while itsmise use -gchild is always freshly started.- Adding
__MISE_DIFFback, or putting the shims before~/.local/bin, makes it return in about 0.2s. I ran both cases from the same context, with no controlling TTY and stdin</dev/null. Only__MISE_DIFFchanged the result (env -u __MISE_DIFF mise x gh -- gh --versiongives rc=124; with the variable it works). So stdin/TTY is not the cause. ghhits the same loop. That makes everyGitHubClicall (PR lookup) hit its 30s timeout.
Omarchy fix: https://github.com/omacom/omarchy/issues/7234 (PRs #8692, #9175, #13769).
T3-side suggestions:
- When a probe times out, show the resolved executable path and suggest the provider "Binary path" setting. Today it reads as an auth problem.
- Kill the whole process group on probe timeout, so a looping stub can't outlive the probe.
- Consider also forwarding
__MISE_DIFF,__MISE_ORIG_PATHand__MISE_SESSIONfrom the login-shell capture, or resolving provider binaries withcommand -vin that same login shell. - Add a "GitHub CLI path" setting.
ghis spawned by bare name (GitHubCli.executeRaw, command"gh") and there's no override, unlike the providers.
Workaround: set the absolute binaryPath (mise installs/<tool>/latest/...) as reported above.
For gh, fix the PATH order.
Hit the same symptom on v0.0.45 (Linux x64, desktop app), and in this case it has a confirmed cause, which may help explain some of the other mise reports here.
Symptom: Claude shows "Unavailable — Claude Agent CLI is installed but failed to run. Timed out while running command." claude --version works instantly in a terminal.
Cause: claude on PATH was a user wrapper script (~/.local/bin/claude) that delegated through mise:
export MISE_MINIMUM_RELEASE_AGE=0
mise use -g "claude" || exit 1
exec mise x "claude" -- "claude" "$@"
The desktop server's PATH had ~/.local/bin before ~/.local/share/mise/installs/claude/latest. Because the install dir was already on PATH, mise x didn't move it to the front, so claude resolved back to the wrapper. Result: infinite recursion (mise use -g claude repeating forever) until the 4s DEFAULT_TIMEOUT_MS in providerSnapshot.ts fired. It looks fine in an interactive shell only because PATH is ordered differently there.
Repro: run the wrapper with the server process's PATH and stdout piped (as spawnAndCollect does): env -i PATH=<server PATH> HOME=$HOME ~/.local/bin/claude --version | cat hangs indefinitely.
Fix (user side): change the last line to exec "$(mise which claude)" "$@", which resolves the real binary directly. With the server's PATH it now returns in ~75ms. Setting an absolute Claude binary path in T3 settings also works, as noted above.
Possible T3 improvements: the probe can't tell a hang from slowness, so a message like "claude --version did not exit within 4s; check for wrappers/shims that recurse or wait on the network" would point people in the right direction. Also related: #7230 (a timed-out probe stays cached as an error).
Diagnosed via t3 triage with Claude Code (Claude Opus 5.5).