Skip to content

Propagate direnv/mise/nix environments to agent sessions (login shells) #134

Description

@Ecko95

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions