Skip to content

Conversation

@michaelneale
Copy link
Collaborator

this now maps auto mode in goose appopriately to claude to ensure it takes action
maps the old mode to "smart" and "manual" is not supported (and made clear).
Changed wording, and it will provide some guidance if it fails to find binary.

Copilot AI review requested due to automatic review settings November 6, 2025 01:57
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 updates the Claude Code CLI provider to improve error messages, refactor permission handling, and update documentation references. The changes enhance user experience by providing clearer guidance when the Claude Code CLI is not available or when using unsupported modes.

Key changes:

  • Refactored permission flag logic into a dedicated method apply_permission_flags
  • Improved error messages with better formatting and documentation links
  • Updated provider metadata descriptions to clarify limitations
  • Changed permission mode handling for GooseMode::Auto from --permission-mode acceptEdits to --dangerously-skip-permissions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Ok(json!(claude_messages))
}

/// Parse the JSON response from claude CLI
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

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

The doc comment '/// Parse the JSON response from claude CLI' is incorrect for this function. It should describe applying permission flags to the command, not parsing JSON responses.

Suggested change
/// Parse the JSON response from claude CLI
/// Apply permission flags to the command based on the current GooseMode

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

Choose a reason for hiding this comment

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

thanks, co-pilot! or delete the comment

Comment on lines +184 to +185
Please use Auto (which will run anything it needs to) or \
SmartApprove (most things will run or Chat Mode)\n\n\n"
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

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

The error message has unclear wording. 'SmartApprove (most things will run or Chat Mode)' is grammatically incorrect. It should be clearer, such as: 'Please use Auto (which will run anything it needs to), SmartApprove (most things will run), or Chat Mode.'

Suggested change
Please use Auto (which will run anything it needs to) or \
SmartApprove (most things will run or Chat Mode)\n\n\n"
Please use Auto (which will run anything it needs to), SmartApprove (most things will run), or Chat Mode\n\n\n"

Copilot uses AI. Check for mistakes.
pub const CLAUDE_CODE_KNOWN_MODELS: &[&str] = &["sonnet", "opus", "claude-sonnet-4-20250514"];

pub const CLAUDE_CODE_DOC_URL: &str = "https://claude.ai/cli";
pub const CLAUDE_CODE_KNOWN_MODELS: &[&str] = &["sonnet", "opus"];
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

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

Removing 'claude-sonnet-4-20250514' from CLAUDE_CODE_KNOWN_MODELS will cause the model argument to not be passed to the CLI when using the default model (since line 337 checks if the model is in KNOWN_MODELS). This breaks the default behavior where users expect the default model to be passed to the command.

Suggested change
pub const CLAUDE_CODE_KNOWN_MODELS: &[&str] = &["sonnet", "opus"];
pub const CLAUDE_CODE_KNOWN_MODELS: &[&str] = &["claude-sonnet-4-20250514", "sonnet", "opus"];

Copilot uses AI. Check for mistakes.
Ok(json!(claude_messages))
}

/// Parse the JSON response from claude CLI
Copy link
Collaborator

Choose a reason for hiding this comment

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

thanks, co-pilot! or delete the comment

- Claude Code CLI is installed and logged in\n\
- The command is in your PATH, or set `CLAUDE_CODE_COMMAND` in your config\n\n\
**For full features, please use the Anthropic provider with an API key if possible.**\n\n\
Visit {} for installation instructions.",
Copy link
Collaborator

Choose a reason for hiding this comment

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

or change the path using @jamadeo 's new tricks

@alexhancock alexhancock merged commit f5b1c16 into main Nov 6, 2025
21 checks passed
wpfleger96 added a commit that referenced this pull request Nov 6, 2025
* main: (60 commits)
  fix: add standard context menu items to prevent empty right-click menu (#5616)
  Bump openapi in prepare-release (#5611)
  docs: add access control section to Developer tutorial (#5615)
  Token state not showing on load, or after message is finished. (#5606)
  Change the other location too (#5608)
  feat(ui): bring back quick launcher (#5144)
  Support platform tools through CLI (#5570)
  Avoid web double write (#5601)
  fix: gemini flash -> pro for mcp smoke tests (#5574)
  Manual compaction test and fix (#5568)
  fix: tidy up claude cli handling (#5594)
  Remove jetbrains (#5602)
  feat(githubcopilot): add support for newer Copilot AI Models (#5603)
  fix: customised recipe to yaml string to avoid minininjia parsing error (#5494)
  Add pending extension indicator to extension panel (#5493)
  Add environment subsition for auth blocks (#5439)
  acp: ToolCallLocations and working cancellation (#5588)
  feat(providers): add Mistral AI provider (#5009)
  Listen for ctrl-c during provider request (#5585)
  Also accept null as description, not just missing (#5589)
  ...
wpfleger96 added a commit that referenced this pull request Nov 6, 2025
* main: (31 commits)
  Standardize CLI argument flags and update documentation (#5516)
  Release 1.13.0
  fix: move goosehints/AGENTS.md handling to goose, and out of developer extension (#5575)
  fix: add standard context menu items to prevent empty right-click menu (#5616)
  Bump openapi in prepare-release (#5611)
  docs: add access control section to Developer tutorial (#5615)
  Token state not showing on load, or after message is finished. (#5606)
  Change the other location too (#5608)
  feat(ui): bring back quick launcher (#5144)
  Support platform tools through CLI (#5570)
  Avoid web double write (#5601)
  fix: gemini flash -> pro for mcp smoke tests (#5574)
  Manual compaction test and fix (#5568)
  fix: tidy up claude cli handling (#5594)
  Remove jetbrains (#5602)
  feat(githubcopilot): add support for newer Copilot AI Models (#5603)
  fix: customised recipe to yaml string to avoid minininjia parsing error (#5494)
  Add pending extension indicator to extension panel (#5493)
  Add environment subsition for auth blocks (#5439)
  acp: ToolCallLocations and working cancellation (#5588)
  ...
michaelneale added a commit that referenced this pull request Nov 7, 2025
* main: (21 commits)
  differentiate debug/release in cache key (#5613)
  Unify subrecipe and subagent execution through shared recipe pipeline (#5082)
  Standardize CLI argument flags and update documentation (#5516)
  Release 1.13.0
  fix: move goosehints/AGENTS.md handling to goose, and out of developer extension (#5575)
  fix: add standard context menu items to prevent empty right-click menu (#5616)
  Bump openapi in prepare-release (#5611)
  docs: add access control section to Developer tutorial (#5615)
  Token state not showing on load, or after message is finished. (#5606)
  Change the other location too (#5608)
  feat(ui): bring back quick launcher (#5144)
  Support platform tools through CLI (#5570)
  Avoid web double write (#5601)
  fix: gemini flash -> pro for mcp smoke tests (#5574)
  Manual compaction test and fix (#5568)
  fix: tidy up claude cli handling (#5594)
  Remove jetbrains (#5602)
  feat(githubcopilot): add support for newer Copilot AI Models (#5603)
  fix: customised recipe to yaml string to avoid minininjia parsing error (#5494)
  Add pending extension indicator to extension panel (#5493)
  ...
fbalicchia pushed a commit to fbalicchia/goose that referenced this pull request Nov 7, 2025
Signed-off-by: fbalicchia <fbalicchia@gmail.com>
Surendhar-N-D pushed a commit to Surendhar-N-D/goose that referenced this pull request Nov 17, 2025
arul-cc pushed a commit to arul-cc/goose that referenced this pull request Nov 17, 2025
BlairAllan pushed a commit to BlairAllan/goose that referenced this pull request Nov 29, 2025
Signed-off-by: Blair Allan <Blairallan@icloud.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.

4 participants