Files
hapi/cli/src/utils
a6102c56d5 fix(runner): apply runner.env.local when a terminal starts the runner
`hapi runner start` spawned `runner start-sync` with `env: process.env`, so a
runner restarted from an interactive shell inherited that shell's provider
credentials. On a machine where the login shell also drives a provider
directly (e.g. official DeepSeek in ~/.zshrc), the restarted runner silently
lost the `~/.hapi/runner.env.local` overrides and every spawned Claude session
hit the wrong endpoint — 400 "supported API model names are ..." — while
sessions on the previous runner kept working.

The launchd launcher already sources both env files; only the terminal path
did not. Load `runner.env.local` in the parent before spawning, with the same
precedence (overrides win). Shell `$VAR`/`${VAR}` references expand from the
inherited env (single quotes stay literal), so paths like
`"$HOME/.dsh/hapi-token"` survive without a shell.

The interactive shell's own exports are untouched: official-provider use and
HAPI-spawned agents no longer share one set of credentials.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-12-03 09:47:14 +08:00
..
2025-12-16 15:03:50 +08:00
2025-12-16 15:03:50 +08:00
2025-12-16 15:03:50 +08:00
2025-12-16 15:03:50 +08:00
2025-12-16 15:03:50 +08:00
2025-12-16 15:03:50 +08:00
2025-12-16 15:03:50 +08:00
2025-12-16 15:03:50 +08:00
2025-12-16 15:03:50 +08:00