Skip to content

Conversation

@blackgirlbytes
Copy link
Contributor

Summary

Fixes an issue where the GOOSE_TERMINAL documentation incorrectly advised zsh users to put customizations in ~/.zshrc. Since goose runs commands using zsh -c "command" (a non-interactive shell), ~/.zshrc is never sourced.

Changes

  • Add caution callout explaining zsh users must use ~/.zshenv instead of ~/.zshrc
  • Add practical example for blocking git commit when run by goose
  • Update file location guidance for zsh vs bash users

Why this matters

Users following the existing docs would set up GOOSE_TERMINAL checks in ~/.zshrc and wonder why they don't work. This was discovered when testing the git commit blocking feature - it only worked after moving the function to ~/.zshenv.

Testing

Verified that:

  1. GOOSE_TERMINAL=1 is set when goose runs shell commands
  2. A git wrapper function in ~/.zshenv successfully blocks git commit
  3. The same function in ~/.zshrc does NOT work (because it's not sourced)

- Add caution callout explaining zsh users must use ~/.zshenv instead of
  ~/.zshrc since goose runs commands with 'zsh -c' (non-interactive shell)
- Add practical example for blocking git commit when run by goose
- Update file location guidance for zsh vs bash users
@blackgirlbytes blackgirlbytes requested a review from a team as a code owner December 29, 2025 21:23
Copilot AI review requested due to automatic review settings December 29, 2025 21:23
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 fixes a critical documentation issue where zsh users were incorrectly instructed to configure GOOSE_TERMINAL customizations in ~/.zshrc, which is not sourced by non-interactive shells. The documentation now correctly directs zsh users to use ~/.zshenv instead.

Key changes:

  • Added a caution callout explaining the difference between zsh and bash shell configuration sourcing behavior
  • Provided a practical example demonstrating how to block git commit when run by goose
  • Updated file location guidance to distinguish between zsh (~/.zshenv) and bash (~/.bashrc) users

@github-actions
Copy link
Contributor

github-actions bot commented Dec 29, 2025

PR Preview Action v1.6.3
Preview removed because the pull request was closed.
2025-12-29 22:37 UTC

@blackgirlbytes blackgirlbytes merged commit c5b9163 into main Dec 29, 2025
18 checks passed
@blackgirlbytes blackgirlbytes deleted the docs/goose-terminal-zshenv branch December 29, 2025 22:35
michaelneale added a commit that referenced this pull request Dec 30, 2025
* main:
  fix: adding more open models (#6300)
  docs: add goose for vs code extension (#6262)
  feat(code-mode): use server names for MCP extensions (#6284)
  docs: agent skills compatibility note (#6299)
  docs: clarify GOOSE_TERMINAL requires ~/.zshenv for zsh users (#6297)
  feat: add OpenAI Codex CLI provider (#6263)
  docs: fix Resources menu (#6292)
  Remove Advent of AI announcement banner (#6291)
  Add blog post: How We Use goose to Maintain goose (#6289)
cronus42 pushed a commit to cronus42/goose that referenced this pull request Jan 7, 2026
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.

3 participants