feat: handle idle-return prompt after 75+ minutes of inactivity (v2.1.84) #255

Closed
opened 2026-04-13 09:11:36 -07:00 by hikari · 1 comment
Owner

Context

Claude Code v2.1.84 added an idle-return prompt that fires after 75+ minutes of session inactivity. This appears as an interactive prompt in the CLI asking the user to confirm they want to continue.

In --output-format stream-json mode (which we use), this likely surfaces as either:

  • A system message with a specific subtype
  • A user prompt request requiring input
  • A special elicitation-style event

The exact stream-json representation needs investigation.

Why This Matters

If unhandled, this idle prompt could cause the session to stall silently in Hikari Desktop — the user may not realise Claude Code is waiting for confirmation, and the character would be stuck in an active state indefinitely.

Ideally we should:

  1. Detect the idle-return prompt in the stream
  2. Surface it to the user in the UI (e.g. a notification or inline prompt)
  3. Possibly trigger the Permission character state (confused shrug) since user input is required

Tasks

  • Investigate what the idle-return prompt looks like in stream-json output (run a long session to observe)
  • Add the appropriate type variant in src-tauri/src/types.rs if it's a new message type
  • Handle it in src-tauri/src/wsl_bridge.rs — surface to UI and/or trigger Permission state
  • Consider adding a UI notification for sessions idle > 75 minutes
  • Add tests once the event format is confirmed

References

  • Claude Code v2.1.84 changelog
  • src-tauri/src/types.rs
  • src-tauri/src/wsl_bridge.rs
  • Existing ElicitationEvent handling (similar pattern)

This issue was created with help from Hikari~ 🌸

## Context Claude Code v2.1.84 added an **idle-return prompt** that fires after 75+ minutes of session inactivity. This appears as an interactive prompt in the CLI asking the user to confirm they want to continue. In `--output-format stream-json` mode (which we use), this likely surfaces as either: - A `system` message with a specific subtype - A `user` prompt request requiring input - A special elicitation-style event The exact stream-json representation needs investigation. ## Why This Matters If unhandled, this idle prompt could cause the session to stall silently in Hikari Desktop — the user may not realise Claude Code is waiting for confirmation, and the character would be stuck in an active state indefinitely. Ideally we should: 1. Detect the idle-return prompt in the stream 2. Surface it to the user in the UI (e.g. a notification or inline prompt) 3. Possibly trigger the `Permission` character state (confused shrug) since user input is required ## Tasks - [ ] Investigate what the idle-return prompt looks like in stream-json output (run a long session to observe) - [ ] Add the appropriate type variant in `src-tauri/src/types.rs` if it's a new message type - [ ] Handle it in `src-tauri/src/wsl_bridge.rs` — surface to UI and/or trigger `Permission` state - [ ] Consider adding a UI notification for sessions idle > 75 minutes - [ ] Add tests once the event format is confirmed ## References - Claude Code v2.1.84 changelog - `src-tauri/src/types.rs` - `src-tauri/src/wsl_bridge.rs` - Existing `ElicitationEvent` handling (similar pattern) ✨ This issue was created with help from Hikari~ 🌸
Author
Owner

Investigation Results

After digging into the installed Claude Code CLI source (cli.js), the idle-return prompt after 75+ minutes appears to be a TUI-only feature — it uses the terminal's interactive prompt system, not the hook/stream-json pipeline.

When running in --output-format stream-json mode (which is how Hikari Desktop communicates with Claude Code), interactive TUI prompts are suppressed entirely. There is no corresponding hook event type (no [IdleReturn Hook] or similar), and no stream-json message type for this event.

Conclusion

No action required for Hikari Desktop. The idle-return prompt does not surface in our communication channel.

If this assumption ever proves incorrect (e.g. a future CLI version adds an IdleReturn hook), we can revisit. Closing as won't fix / not applicable.

This comment was added by Hikari~ 🌸

## Investigation Results After digging into the installed Claude Code CLI source (`cli.js`), the idle-return prompt after 75+ minutes appears to be a **TUI-only feature** — it uses the terminal's interactive prompt system, not the hook/stream-json pipeline. When running in `--output-format stream-json` mode (which is how Hikari Desktop communicates with Claude Code), interactive TUI prompts are suppressed entirely. There is no corresponding hook event type (no `[IdleReturn Hook]` or similar), and no stream-json message type for this event. ## Conclusion **No action required for Hikari Desktop.** The idle-return prompt does not surface in our communication channel. If this assumption ever proves incorrect (e.g. a future CLI version adds an `IdleReturn` hook), we can revisit. Closing as won't fix / not applicable. ✨ This comment was added by Hikari~ 🌸
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nhcarrigan/hikari-desktop#255