-
Notifications
You must be signed in to change notification settings - Fork 295
Description
Bug Description
The q_cli_default
agent override feature documented in default-agent-behavior.md is not working as expected. When a custom q_cli_default.json
file is placed in .amazonq/cli-agents/
, it is ignored and the built-in default agent is used instead.
Expected Behavior
When a q_cli_default.json
file exists in the local or global agent directories, it should completely override the built-in default agent configuration, including custom resources, tools, and settings.
Actual Behavior
The custom q_cli_default.json
file is ignored, and the built-in default agent with hardcoded resources (AmazonQ.md, README.md, etc.) is used instead.
Root Cause
In crates/chat-cli/src/cli/agent/mod.rs
around line 688, the code directly calls Agent::default()
without first checking if a q_cli_default.json
file exists.
Reproduction Steps
- Create
.amazonq/cli-agents/q_cli_default.json
with custom resources - Run
q chat
- Check
/context show
- shows built-in resources instead of custom ones
Impact
This prevents teams from setting up workspace-specific default agents that automatically load project context and rules when anyone runs q chat
in their workspace.
Additional Issues
- Documentation is missing the
.json
extension requirement - No test coverage for this feature