aws / aws/amazon-q-developer-cli
Feature request: Add a hook event when agent is waiting for user tool approval
- Dominant language
- Rust
- Stars
- 2k
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
When the agent pauses to ask the user for tool-use approval (e.g. shell commands, file writes), there is no hook event emitted. External integrations cannot distinguish between "tool is executing" and "tool is awaiting user permission."
## Current behavior
The hook lifecycle for a tool that requires approval:
1. `preToolUse` fires → external system assumes agent is **working**
2. Agent displays approval prompt and waits (no event emitted)
3. User approves/rejects
4. `postToolUse` fires (or `stop` on rejection)
During step 2, which can last minutes, there is no signal to external consumers.
## Requested behavior
Emit a new hook event (e.g. `toolApproval` or `permissionPrompt`) when the agent is blocked waiting for user approval. This would allow external tools to show an "attention needed" state.
## Context
Other CLI agents with hook systems already provide this:
- **Claude Code**: `PermissionRequest` / `Notification(permission_prompt)`
- **Gemini CLI**: `Notification(ToolPermission)`
The existing Kiro/Q CLI hook set (`agentSpawn`, `userPromptSubmit`, `preToolUse`, `postToolUse`, `stop`) covers the working/idle lifecycle well, but the attention/approval gap is the missing piece for complete status tracking.
Contributor guide
Assessment
This issue has not been assessed yet.