[Bug]: Kiro, fx and Antigravity reject a home-relative Binary path that works as an absolute path #35150
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/server
Steps to reproduce#
Use a dependency-installed checkout at the commit under Version or commit. Save the script below outside the checkout as repro.sh and run CHECKOUT=/path/to/t3code sh /path/to/repro.sh (or sh /path/to/repro.sh from the checkout root).
- The script creates a temporary fixture directory with a private
HOME(isolated-home),TMPDIRandT3CODE_HOME, and writes fakekiro-cli,fx,grok,piandagyexecutables intoisolated-home/.local/bin. They answer--versionwith a synthetic2.32.0and return canned model or status JSON; no real provider, account or network is involved. - For Kiro, fx, Grok and Pi, it decodes
{ binaryPath: "~/.local/bin/<cli>" }through the realServerSettingsand provider settings schemas, asserts that decoding leaves~/intact, then calls each provider's exported production status function once with that value and once with the absolute path of the same executable. - For Antigravity, it calls the real
makeAntigravityInstallation(...).resolvewith~/.local/bin/agyand with the absolute path. - It exits 0 only when all five home-relative inputs fail detection and all five absolute controls succeed. The fixture directory is removed on exit.
The production callers of these functions are the Kiro driver, the fx driver, the Grok driver, the Pi driver, and Antigravity's disk probe, which calls the same installation resolver.
The corresponding user setup is Settings → Providers → Kiro (or fx, or Antigravity) with Binary path set to ~/.local/bin/kiro-cli while kiro-cli is installed there and not on the server's PATH.
Reproduction script: repro.sh
#!/bin/sh
set -eu
CHECKOUT=${CHECKOUT:-$(pwd)}
CHECKOUT=$(cd "$CHECKOUT" && pwd)
fixture=$(mktemp -d)
trap 'rm -rf "$fixture"' EXIT HUP INT TERM
mkdir -p "$fixture/isolated-home/.local/bin" "$fixture/tmp" "$fixture/t3"
export HOME="$fixture/isolated-home" TMPDIR="$fixture/tmp" T3CODE_HOME="$fixture/t3" CHECKOUT
for executable in kiro-cli fx grok pi agy; do
cat > "$HOME/.local/bin/$executable" <<'CLI'
#!/bin/sh
case "$*" in
--version) printf '%s\n' '2.32.0';;
'whoami --format json') printf '%s\n' 'fixture: sign-in not simulated'; exit 2;;
'chat --list-models --format json') printf '%s\n' '{"models":[{"model_id":"auto","model_name":"Auto"}],"default_model":"auto"}';;
'status --json') printf '%s\n' '{"auth":"api_key","model":"fixture-model"}';;
'models --json') printf '%s\n' '{"ids":["fixture-model"]}';;
*) exit 2;;
esac
CLI
chmod 755 "$HOME/.local/bin/$executable"
done
cd "$CHECKOUT/apps/server"
node --input-type=module <<'JS'
import assert from 'node:assert/strict';
import path from 'node:path';
import { pathToFileURL } from 'node:url';
import * as Effect from 'effect/Effect';
import * as Schema from 'effect/Schema';
import {ServerSettings} from '@t3tools/contracts';
import * as NodeServices from '@effect/platform-node/NodeServices';
import * as NodeCrypto from '@effect/platform-node/NodeCrypto';
import * as NodeHttpClient from '@effect/platform-node/NodeHttpClient';
const root = process.env.CHECKOUT;
const load = (file) => import(pathToFileURL(path.join(root, file)).href);
const environment = {HOME: process.env.HOME, PATH:'/usr/bin:/bin', TMPDIR:process.env.TMPDIR};
const cases = [['kiro','KiroSettings','checkKiroProviderStatus','kiro-cli'],['fx','FxSettings','checkFxProviderStatus','fx'],['grok','GrokSettings','checkGrokProviderStatus','grok'],['pi','PiSettings','checkPiProviderStatus','pi']];
await Effect.runPromise(Effect.gen(function*() {
for (const [provider, schemaName, checkName, binary] of cases) {
const settings = (yield* Effect.promise(() => load(`packages/provider-${provider}/src/settings.ts`)))[schemaName];
const check = (yield* Effect.promise(() => load(`packages/provider-${provider}/src/server/status.ts`)))[checkName];
const relative = `~/.local/bin/${binary}`;
const absolute = path.join(environment.HOME,'.local/bin',binary);
const decode = Schema.decodeUnknownSync(settings);
const serverSettings = Schema.decodeUnknownSync(ServerSettings)({providerInstances:{[provider]:{driver:provider,enabled:true,config:{enabled:true,binaryPath:relative}}}});
const rawConfig = serverSettings.providerInstances[provider].config;
assert.equal(rawConfig.binaryPath,relative);
const parsed = decode(rawConfig);
assert.equal(parsed.binaryPath, relative);
console.log(`${provider.toUpperCase()}_DECODED: ${parsed.binaryPath}`);
const compact = ({installed,version,status,message}) => ({installed,version,status,...(message?{message}:{})});
const tilde = yield* check(parsed,environment);
const control = yield* check(decode({enabled:true,binaryPath:absolute}),environment);
console.log(`${provider.toUpperCase()}_TILDE: ${JSON.stringify(compact(tilde))}`);
console.log(`${provider.toUpperCase()}_ABSOLUTE: ${JSON.stringify(compact(control))}`);
assert.equal(tilde.installed,false);
assert.equal(tilde.status,'error');
assert.equal(control.installed,true);
assert.equal(control.version,'2.32.0');
if(provider === 'kiro') assert.equal(control.status,'warning');
}
const {makeAntigravityInstallation} = yield* Effect.promise(() => load('apps/server/src/provider/AntigravityInstallation.ts'));
const installation = yield* makeAntigravityInstallation({baseDir:process.env.T3CODE_HOME,releaseAsset:null});
const tilde = yield* installation.resolve('~/.local/bin/agy',environment).pipe(Effect.result);
const control = yield* installation.resolve(path.join(environment.HOME,'.local/bin/agy'),environment).pipe(Effect.result);
console.log(`ANTIGRAVITY_TILDE: ${JSON.stringify(tilde._tag === 'Failure' ? {result:tilde._tag,detail:tilde.failure.detail} : {result:tilde._tag})}`);
console.log(`ANTIGRAVITY_ABSOLUTE: ${JSON.stringify(control._tag === 'Success' ? {result:control._tag,source:control.success.source,kind:control.success.kind} : {result:control._tag,detail:control.failure.detail})}`);
assert.equal(tilde._tag,'Failure');
assert.equal(control._tag,'Success');
assert.equal(control.success.executablePath,path.join(environment.HOME,'.local/bin/agy'));
}).pipe(Effect.scoped,Effect.provide(NodeHttpClient.layerUndici),Effect.provide(NodeCrypto.layer),Effect.provide(NodeServices.layer)));
console.log('DEFECT PRESENT: all five home-relative paths fail while absolute controls detect the same scratch executables.');
JS
Expected behavior#
A Binary path such as ~/.local/bin/kiro-cli locates the same executable as its absolute expansion against the server's home directory. The Kiro setup guide tells users to set Binary path when kiro-cli is not on PATH and names ~/.local/bin as the usual install directory; it gives the directory, not a full ~/.local/bin/kiro-cli example. Codex, Claude, Muse and OpenCode already expand this setting through the shared expandHomePath helper, whose comment explains that spawned processes do not expand ~ themselves. #29326 added that expansion for OpenCode (for #29302) and scoped its change to OpenCode only; neither it nor any other discussion found states that other providers should reject home-relative paths.
Actual behavior#
Summary. When the Kiro, fx or Antigravity Binary path is set to a home-relative path such as ~/.local/bin/kiro-cli, T3 Code reports the provider as not installed (Kiro, fx) or rejects the custom executable as missing (Antigravity). The same executable given as an absolute path is detected and its version read. Codex, Claude, Muse and OpenCode already expand a leading ~/ in this setting against the server home. Grok and Pi have the same gap, but open #29330 already fixes those two, so they appear here only to document the full scope; the unhandled scope of this report is Kiro, fx and Antigravity. The provider is unavailable until the user replaces the path with an absolute one.
Observed through the real status functions: for ~/.local/bin/kiro-cli, Kiro returns installed: false, version: null, status: "error" and Kiro CLI (`kiro-cli`) is not installed or not on PATH. With only Binary path changed to the absolute path of the same fake executable, it returns installed: true and version 2.32.0; its warning status is the expected sign-in warning because the fixture does not simulate Kiro authentication. fx likewise reports the home-relative executable as not installed, while its absolute control reaches ready. Antigravity's installation resolver rejects ~/.local/bin/agy as a missing or non-executable custom executable and accepts the absolute path as an override. Grok and Pi fail the same way (covered by #29330).
The setting reaches the drivers unexpanded: the settings form stores the entered string, the Binary path schema trims and supplies a default without expansion, and the instance registry passes the decoded config to the driver. Kiro's status probe spawns the raw command, and its ACP spawn builder keeps the same raw path. The session launch path was traced in source only; no authenticated session or turn was run.
An audit of every active Binary path consumer at the tested commit found five without expansion: Kiro, fx, Antigravity, Grok and Pi. Cursor keeps a hidden legacy field that its current SDK driver does not read, and the ACP Registry has no Binary path setting. On current main (the later build under Version or commit), the Kiro, fx and Antigravity drivers and the Antigravity installation resolver still contain no home expansion; the only change among them since the tested commit is Antigravity install diagnostics.
Evidence#
- Expected source: the Kiro setup guide at
docs/user/providers-kiro.mdlines 16-18 and the existing home expansion for Codex, Claude, Muse and OpenCode throughpackages/provider-core/src/server/pathExpansion.tslines 3-12. - Failure source: the observed
KIRO_TILDE,FX_TILDEandANTIGRAVITY_TILDEresults and their absolute controls under Logs or stack traces, plus the raw-command spawn atpackages/provider-kiro/src/server/status.tslines 112-126. - Evidence provenance: observed
- Local verification: reproduced
- Reproduction completeness: complete
Restoration check#
With the script's fake executables, ~/.local/bin/kiro-cli, ~/.local/bin/fx and ~/.local/bin/agy give the same detection result as their absolute controls: Kiro and fx report installed: true with version 2.32.0, and the Antigravity resolver succeeds with the expanded executable path. The absolute controls keep working, and the Kiro and fx session launches use the expanded executable. The script's assertions need inverting for this check.
References#
- #29326 (merged) and #29302: home expansion for OpenCode only.
- #29330 (open): adds home expansion for Grok and Pi; its current changes touch only the Grok and Pi drivers and tests.
- #12722 (closed): proposed Antigravity home-path expansion together with an unrelated architecture change and was closed with a request to split the changes.
- #12752 and #24683 (open): Windows wrapper scripts as the Antigravity binary path, not home expansion.
Impact#
Minor bug or occasional failure
Version or commit#
d9805b2ca667be7caec8c9035950564ab96704c3 (also reproduced at upstream ee90bdc940 with the same installed dependencies; current main 6da3ff23d2 checked statically: the Kiro, fx and Antigravity paths still have no home expansion)
Environment#
Darwin arm64, Node v26.12.1, dependency-installed source checkout; exported server functions with isolated HOME, TMPDIR and T3CODE_HOME; provider version 2.32.0 is synthetic fixture output from fake executables; no real provider authentication, model turn, GUI session or Windows run
Logs or stack traces#
<time> replaces the log timestamps. The WARN lines come from the Grok and Pi probes against fake executables and are expected.
KIRO_DECODED: ~/.local/bin/kiro-cli
KIRO_TILDE: {"installed":false,"version":null,"status":"error","message":"Kiro CLI (`kiro-cli`) is not installed or not on PATH."}
KIRO_ABSOLUTE: {"installed":true,"version":"2.32.0","status":"warning","message":"Could not confirm the Kiro sign-in. Run `kiro-cli whoami` to check."}
FX_DECODED: ~/.local/bin/fx
FX_TILDE: {"installed":false,"version":null,"status":"error","message":"fx is not installed or not on PATH."}
FX_ABSOLUTE: {"installed":true,"version":"2.32.0","status":"ready"}
GROK_DECODED: ~/.local/bin/grok
[<time>] WARN (#1): Grok CLI health check failed. { errorTag: 'PlatformError' }
[<time>] WARN (#1): Grok CLI model listing failed or timed out. { errorTag: 'ExitCode2' }
[<time>] WARN (#1): Grok ACP initialize probe failed or timed out. { errorTag: 'Interrupt' }
GROK_TILDE: {"installed":false,"version":null,"status":"error","message":"Grok CLI (`grok`) is not installed or not on PATH."}
GROK_ABSOLUTE: {"installed":true,"version":"2.32.0","status":"warning","message":"Grok CLI is installed but ACP initialize failed. Model options may be incomplete."}
PI_DECODED: ~/.local/bin/pi
[<time>] WARN (#1): Pi CLI health check failed. { errorTag: 'PlatformError' }
[<time>] WARN (#1): Pi RPC discovery failed. { errorTag: 'PiRpcError' }
PI_TILDE: {"installed":false,"version":null,"status":"error","message":"Pi CLI (`pi`) is not installed or not on PATH. Install with `npm install -g --ignore-scripts @earendil-works/pi-coding-agent`."}
PI_ABSOLUTE: {"installed":true,"version":"2.32.0","status":"ready","message":"Pi is available, but T3 Code could not refresh its models and commands. The live session will retry startup."}
ANTIGRAVITY_TILDE: {"result":"Failure","detail":"The custom Antigravity executable is missing or not executable, or it needs a localharness_external sibling. The agy CLI does not."}
ANTIGRAVITY_ABSOLUTE: {"result":"Success","source":"override"}
DEFECT PRESENT: all five home-relative paths fail while absolute controls detect the same scratch executables.
Screenshots, recordings, or supporting files#
No response
Workaround#
Enter the absolute server-side path to the executable in Binary path. In the reproduction, changing only this value makes the same fake executable detectable for Kiro, fx, Grok, Pi and Antigravity.
juliusmarminge closed this
Sign in to join this conversation.