Skip to content

Add PATH detection back to developer extension#7161

Merged
codefromthecrypt merged 1 commit intomainfrom
jackamadeo/fix-dev-path
Feb 12, 2026
Merged

Add PATH detection back to developer extension#7161
codefromthecrypt merged 1 commit intomainfrom
jackamadeo/fix-dev-path

Conversation

@jamadeo
Copy link
Collaborator

@jamadeo jamadeo commented Feb 11, 2026

fixes #7153

it was lost in the #6392 refactor. Maybe there's a not-too-expensive test for this.

Copilot AI review requested due to automatic review settings February 11, 2026 19:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restores user-PATH detection for the in-process developer builtin extension in goose-server, addressing the regression described in #7153 when the extension stopped running as a child process.

Changes:

  • Adds a custom spawn_developer builtin spawn function that configures DeveloperServer to extend PATH via the user’s shell and uses a .bash_env file.
  • Overrides the default "developer" entry in the builtin extension registry during AppState::new() initialization.

Comment on lines 48 to 50
register_builtin_extensions(goose_mcp::BUILTIN_EXTENSIONS.clone());
register_builtin_extension("developer", spawn_developer);

Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only overrides the built-in "developer" spawn fn in goose-server; other entrypoints that call register_builtin_extensions(goose_mcp::BUILTIN_EXTENSIONS.clone()) (e.g. crates/goose-cli/src/cli.rs and crates/goose-acp/src/server.rs) will still use the default DeveloperServer without PATH extension, so the PATH regression may persist outside goose-server—consider applying the same override there or centralizing a shared helper for a "developer-with-shell-PATH" spawn fn.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is intentional, we don't do this for goose-acp and goose-cli

Copy link
Collaborator

@DOsinga DOsinga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should do a smoke-test with a reliable provider that does more specific scenarions - that could catch this, no?

Copy link
Collaborator

@michaelneale michaelneale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch - this seems to keep happening?

Copy link
Collaborator

@codefromthecrypt codefromthecrypt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for putting this back, sorry about the broken eggs.

pub extension_loading_tasks: ExtensionLoadingTasks,
}

fn spawn_developer(r: tokio::io::DuplexStream, w: tokio::io::DuplexStream) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tempted to thread through the config dir, so that it is testable. can take that in another PR, if you like

@codefromthecrypt codefromthecrypt added this pull request to the merge queue Feb 12, 2026
Merged via the queue into main with commit 5c4bfe9 Feb 12, 2026
23 of 24 checks passed
@codefromthecrypt codefromthecrypt deleted the jackamadeo/fix-dev-path branch February 12, 2026 01:57
lifeizhou-ap added a commit that referenced this pull request Feb 12, 2026
* main:
  fix text editor view broken (#7167)
  docs: White label guide (#6857)
  Add PATH detection back to developer extension (#7161)
  docs: pin version in ci/cd (#7168)
  Desktop: - No Custom Headers field for custom OpenAI-compatible providers  (#6681)
  feat: edit model and extensions of a recipe from GUI (#6804)
  feat: MCP support for agentic CLI providers (#6972)
jh-block added a commit that referenced this pull request Feb 12, 2026
* origin/main: (33 commits)
  fix: replace panic with proper error handling in get_tokenizer (#7175)
  Lifei/smoke test for developer (#7174)
  fix text editor view broken (#7167)
  docs: White label guide (#6857)
  Add PATH detection back to developer extension (#7161)
  docs: pin version in ci/cd (#7168)
  Desktop: - No Custom Headers field for custom OpenAI-compatible providers  (#6681)
  feat: edit model and extensions of a recipe from GUI (#6804)
  feat: MCP support for agentic CLI providers (#6972)
  docs: keyring fallback to secrets.yaml (#7165)
  feat: load provider/model specified inside the recipe config (#6884)
  fix ask-ai bot hitting tool call limits (#7162)
  fix flatpak icon (#7154)
  [docs] Skills Marketplace UI Improvements (#7158)
  More no-window flags (#7122)
  feat: Allow overriding default bat themes using environment variables (#7140)
  Make the system prompt smaller (#6991)
  Pre release script (#7145)
  Spelling (#7137)
  feat(mcp): upgrade rmcp to 0.15.0 and advertise MCP Apps UI extension capability (#6927)
  ...
@jamadeo
Copy link
Collaborator Author

jamadeo commented Feb 12, 2026

A test for the developer PATH that emulates the real-world use case is tricky, because launching anything from the terminal is always going to inherit the PATH. So I think the way to do this would be to launch goose with a constrained PATH, missing something you would expect the interactive shell to have, and then check that the developer tool does inherit it. I'll look into adding something like that.

tlongwell-block added a commit that referenced this pull request Feb 12, 2026
…provenance

* origin/main: (68 commits)
  Upgraded npm packages for latest security updates (#7183)
  docs: reasoning effort levels for Codex provider (#6798)
  Fix speech local (#7181)
  chore: add .gooseignore to .gitignore (#6826)
  Improve error message logging from electron (#7130)
  chore(deps): bump jsonwebtoken from 9.3.1 to 10.3.0 (#6924)
  docs: standalone mcp apps and apps extension (#6791)
  workflow: auto-update cli-commands on release (#6755)
  feat(apps): Integrate AppRenderer from @mcp-ui/client SDK (#7013)
  fix(MCP): decode resource content (#7155)
  feat: reasoning_content in API for reasoning models (#6322)
  Fix/configure add provider custom headers (#7157)
  fix: handle keyring fallback as success (#7177)
  Update process-wrap to 9.0.3 (9.0.2 is yanked) (#7176)
  feat: support extra field in chatcompletion tool_calls for gemini openai compat (#6184)
  fix: replace panic with proper error handling in get_tokenizer (#7175)
  Lifei/smoke test for developer (#7174)
  fix text editor view broken (#7167)
  docs: White label guide (#6857)
  Add PATH detection back to developer extension (#7161)
  ...

# Conflicts:
#	.github/workflows/nightly.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Goose developer tools no longer get user's PATH

4 participants