Skip to content

Desktop App: envs config block not forwarded to stdio extension subprocesses. #8130

@botoxparty

Description

@botoxparty

Bug: envs block in stdio extension config not passed to subprocess

Description

Environment variables defined in the envs block of a stdio extension config are not being
passed to the spawned subprocess. The subprocess falls back to its own defaults instead.

Steps to Reproduce

  1. Configure a stdio extension in ~/.config/goose/config.yaml with an envs block:
extensions:
  my-extension:
    enabled: true
    type: stdio
    cmd: /path/to/binary
    args:
      - serve
    envs:
      MY_ENV_VAR: some-value
  1. Launch goose and use the extension
  2. The subprocess does not receive MY_ENV_VAR — it uses its default value instead

Workarounds Attempted

  • Setting vars via ~/.zshrc — doesn't work (goose launched as app doesn't inherit shell env)
  • Setting vars via launchctl setenv — doesn't work
  • Using cmd: env with vars as args — still not working

Expected Behavior

Environment variables in the envs block should be forwarded to the stdio subprocess on launch.

Actual Behavior

Subprocess receives no env vars and falls back to defaults (e.g. localhost:3000 instead of
the configured URL).

Environment

  • goose version: (run goose --version)
  • OS: macOS
  • Extension: mcp-grafana (but reproducible with any stdio extension)

Impact

Makes it impossible to configure stdio extensions that require env vars (e.g. API keys, URLs)
without workarounds. This affects any MCP server that reads configuration from environment
variables, which is the standard pattern.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions