aws / aws/amazon-q-developer-cli

Feature request: Add a hook event when agent is waiting for user tool approval

Open
#3,823 1 comment 0 reactions 0 assignees View on GitHub
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

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.