Files
hapi/cli/src/commands
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
..
2026-11-20 13:19:03 +08:00
2026-07-13 08:41:30 +08:00
2026-05-20 19:55:40 +08:00
2026-01-27 19:51:21 +08:00
2026-06-18 10:01:10 +08:00
2026-11-20 13:33:58 +08:00
2026-11-20 13:19:03 +08:00