Skip to content

fix: use python3 in developer extension instructions for macOS/Linux compatibility - #8784

Merged
jh-block merged 5 commits into
aaif-goose:mainfrom
treebird7:fix/python3-macos-compatibility
May 5, 2026
Merged

fix: use python3 in developer extension instructions for macOS/Linux compatibility#8784
jh-block merged 5 commits into
aaif-goose:mainfrom
treebird7:fix/python3-macos-compatibility

Conversation

@treebird7

Copy link
Copy Markdown
Contributor

Summary

Modern macOS (12+) removed the python binary — only python3 is available.
Many Linux distributions follow the same convention. When the model uses the
developer extension to run Python scripts, it may invoke python directly,
which fails on these systems.

This adds a clear instruction to the non-Windows developer extension system
prompt to always use python3 instead of python.

Testing

  • No existing tests cover the content of developer_instructions() — tests
    in mod.rs are functional tool-call tests (shell, write, edit)
  • The change is a string addition inside the existing cfg!(windows) else
    branch, so Windows behaviour is unaffected

Related Issues

Relates to #8756

…compatibility

Modern macOS (12+) and many Linux distributions no longer ship a `python`
binary, only `python3`. The developer extension instructions now explicitly
tell the model to use `python3` when running Python scripts or commands.

Fixes aaif-goose#8756

Signed-off-by: Treebird <treebird@treebird.dev>
@treebird7
treebird7 force-pushed the fix/python3-macos-compatibility branch from c4eb813 to 77503e4 Compare April 23, 2026 18:12
The snapshot for test_all_platform_extensions was not updated alongside
the developer_instructions() change. Update it to include the two new
python3 guidance lines so the test passes.

Signed-off-by: Treebird <treebird@treebird.dev>
Use write and edit to efficiently make changes. Test and verify as appropriate.

When running Python scripts or commands, always use `python3` instead of `python`.
The `python` command is not available on modern macOS and many Linux distributions.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think the second sentence can be removed; it doesn't shape model behaviour and wastes tokens.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Smart thinking, deleted that sentence.

@jh-block jh-block self-assigned this May 5, 2026
Update documentation to specify using 'python3' command.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fa77451276

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Use write and edit to efficiently make changes. Test and verify as appropriate.

When running Python scripts or commands, always use `python3` instead of `python`.
The `python` command is not available on modern macOS and many Linux distributions.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Remove extra snapshot line not produced by prompt code

This snapshot now expects The python command is not available on modern macOS and many Linux distributions. even though developer_instructions() only adds the preceding python3 sentence in crates/goose/src/agents/platform_extensions/developer/mod.rs and never emits this second line. As a result, prompt_manager::tests::test_all_platform_extensions will fail on non-Windows targets when assert_snapshot! compares generated output to this stale expectation.

Useful? React with 👍 / 👎.

Remove unnecessary information about the 'python' command.
@jh-block

jh-block commented May 5, 2026

Copy link
Copy Markdown
Collaborator

looks good but there's a test failure, looks like whitespace in a snapshot

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jh-block
jh-block added this pull request to the merge queue May 5, 2026
Merged via the queue into aaif-goose:main with commit 8464718 May 5, 2026
22 checks passed
lifeizhou-ap added a commit that referenced this pull request May 6, 2026
* main:
  feat: move goose2 provider catalog behind ACP layer (#9030)
  fix: use python3 in developer extension instructions for macOS/Linux compatibility (#8784)
  fix(acp): synchronously reap ACP child to avoid SIGCHLD race (#9023)
  fix goose2 small-window chat and settings layouts (#9019)
  docs: improve goose2 AGENTS.md (#9028)
  agents: add CLAUDE.mds to mirror AGENTS.mds (#9029)
  remove skill categories (#9008)
  fix: 8531 - elicitation fixes (#8999)
  feat(chat): group consecutive tool calls into one summarized chain card (#8995)
  fix(ci): mark openai/gpt-5 smoke test as flaky (#9027)
  goose2 distribution bundling (#8911)
  Add "Trimmed trailing whitespace" message to moim whitelist (#8847)
shafqatevo pushed a commit to shafqatevo/goose that referenced this pull request Aug 7, 2026
…compatibility (aaif-goose#8784)

Signed-off-by: Treebird <treebird@treebird.dev>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

2 participants