[Bug]: Kiro preToolUse maps to sticky Input needed with no approval observation path
Bug
Kiro TUI sessions can show Summary → Activity as Input needed for ordinary tool use and keep that status sticky until a turn-boundary-style clear. AO installs Kiro preToolUse as permission-request, and StandardDeriveActivityState maps that to sticky waiting_input.
Related: parent family bug #6280 (Copilot / Cline / Kiro). Copilot will be fixed separately via observe-hooks . This issue tracks Kiro-only follow-up.
Code-path confidence: High on current main (hook install + mapping). No separate live TUI recording attached here; behavior follows from the same path called out in #6280.
Reproduction
- Start a Kiro TUI session and invoke a tool (interactive approval via Kiro’s permission UI, or an auto/trust path).
- Observe Activity when AO’s
preToolUsehook runs (ao hooks kiro permission-request). - After the tool is allowed / while tools continue, check whether Activity remains Input needed until
stopor the nextuserPromptSubmit.
Expected: Input needed only while a human decision is actually pending; clear when work resumes after approval.
Actual: Every managed preToolUse enters sticky waiting_input, including tools that never need a human decision. There is no AO terminal waiting-recovery path for Kiro today.
Root cause
backend/internal/adapters/agent/kiro/hooks.go—preToolUse→permission-request(ActivityWaitingInput).backend/internal/adapters/agent/activitystate/activitystate.go— name-only stickywaiting_input.- Managed hooks are
agentSpawn,userPromptSubmit,preToolUse,stop— no post-tool clear; no typed permission-notification hook like Copilot’snotification.permission_prompt. - No
DetectTerminalActivityimplementation for Kiro. - Real approvals are owned by Kiro’s
permissions.yaml/ interactive UI (and PreToolUse can block via exit2); AO’s install does not expose a Copilot-like ask/allow observe contract.
Fix direction
- Stop mapping
preToolUse→permission-request/waiting_input(treat as active / tool-use). - Restore real Input needed ,add terminal approval detection, and/or use ACP Chat approval events if/when Kiro Chat is available (#5604).
- Remap-only without (2) would hide pending TUI approvals until observation exists — same family tradeoff as closed AO PR #2594.