aws / aws/amazon-q-developer-cli

Feature Request: Enable AI Agent Self-Introspection Commands

Open
#2,928 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
2k
Forks
439
PR merge metrics
No merged PRs in 30d

Description

## Problem Statement

AI agents cannot execute Q Chat's built-in introspection commands (`/mcp list`, `/tools`, `/context status`), forcing inefficient workarounds for troubleshooting and capability discovery.

## Current Workarounds

**Manual workaround:**
1. User opens separate Q Chat session
2. Manually runs commands and reports back

**Programmatic workaround:**
```
User: "Check what MCP tools are available"
AI: [opens new terminal] → q chat
AI: [executes /mcp list in new session]
AI: "Here's what I found..."
```

**Why workarounds aren't ideal:**
- **Breaks conversation flow** - context switching disrupts problem-solving
- **Resource overhead** - spawning new Q Chat processes
- **Complexity** - multi-step process for simple introspection
- **Developer friction** - slows down debugging and development workflows

## Proposed Solution

Enable direct introspection within the same conversation:
```
User: "My MCP tool isn't working"
AI: [executes /mcp list directly] → "I can see your toolkit MCP server is disconnected..."
```

## Impact

- **Streamlined developer experience** - no context switching
- **Faster debugging** - immediate diagnosis vs multi-step workarounds
- **Better conversation flow** - seamless troubleshooting
- **Resource efficiency** - single process vs multiple instances

## Scope

**Proposed approach:**
- Enable AI execution of **all read-only slash commands** that provide system introspection
- If implementation complexity requires it, start with core commands (`/mcp list`, `/tools`, `/context`) and expand iteratively

**Security principle:**
- Only commands that read current state without modification
- No configuration changes or destructive operations

## Related Issues

Complements but differs from:
- #2840 (user tool management)
- #2058 (raw output viewing)

This focuses specifically on **AI agent autonomy** for self-diagnosis.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.