Files
tty7/crates
l0ng-ai 3ef692b353 feat(agents): infer interrupted and stale turns, report permission prompts first-hand (#1003)
- Interrupts: an Esc / Ctrl+C (legacy, kitty and modifyOtherKeys forms)
  on a pane whose agent is mid-turn arms a 1s settle; if no hook event
  arrives, the turn is assumed over and goes Done. Claude's Stop skips
  user interrupts, so panes used to stay on working until the next prompt.
- Stale turns: a daemon sweep moves a turn that has been Working with no
  hook event for 30 minutes to Idle.
- Both set `inferred` on the session; the next real event clears it, and
  a tool finishing after a guess puts the turn back on Working. Inferred
  states raise no finish notification and no unread badge.
- Claude and Codex now hook PermissionRequest, and PreToolUse for their
  ask-the-user tools (AskUserQuestion / request_user_input), so Waiting
  shows the moment the prompt opens. Codex also gains PostToolUse, so it
  leaves Waiting once the approved tool has run.
- The "finished" desktop notification waits 1.5s and is dropped if the
  next turn starts first (queued message, Stop hook sending it back).
2026-09-28 20:47:01 +08:00
..