Ported from upstream pingdotgg#523.
Problem
Agent sessions and terminals spawn subshells that are not login shells, so per-project environment managers (direnv, mise, nix flakes) never hook in. Agents end up missing the project's toolchain/env vars, while the same commands work in the user's own terminal.
Proposed fix
Smallest viable change: spawn agent/provider subshells as login shells (bash -l / $SHELL -l) or source the direnv hook before exec, so .envrc / mise / nix develop environments apply.
Notes
Acceptance
A project with an .envrc (direnv allow'd) gets its env vars inside an agent session's shell commands without manual wrapping.
Ported from upstream pingdotgg#523.
Problem
Agent sessions and terminals spawn subshells that are not login shells, so per-project environment managers (direnv, mise, nix flakes) never hook in. Agents end up missing the project's toolchain/env vars, while the same commands work in the user's own terminal.
Proposed fix
Smallest viable change: spawn agent/provider subshells as login shells (
bash -l/$SHELL -l) or source the direnv hook before exec, so.envrc/ mise /nix developenvironments apply.Notes
bash -l -cornix develop -cmanually.Acceptance
A project with an
.envrc(direnv allow'd) gets its env vars inside an agent session's shell commands without manual wrapping.