Skip to content

Agent Waiting-for-Input Marker

When an AI agent running inside a Hive terminal session blocks on you - a permission prompt, a question, or any input request it can't proceed without - Hive marks that session and can notify you. This lets you walk away from a long agent run and come back exactly when it actually needs an answer.

There are two parts:

  • A ? prefix before the session's name in the sidebar, so you can spot a waiting session at a glance.
  • An optional notification with a Copy button that copies the question / prompt text, so you can paste it elsewhere.

The ? marker

A ? appears in front of a session name whenever the agent in that session is genuinely asking for an answer - not merely when it has stopped or finished a turn. A finished-but-unanswered turn does not earn a ?.

The marker is driven by authoritative signals the agent reports to the daemon, not guessed from the terminal title. The marker clears as soon as the agent reports it is no longer waiting.

Copy-prompt notification

When a session starts waiting, Hive can fire a notification carrying the prompt text the agent set:

  • In-app: a toast with a Copy action that copies the question / prompt to your clipboard.
  • App backgrounded: a native OS alert is shown instead.

If the agent did not pass an explicit prompt, Hive falls back to the agent's last message.

On Android, a session that started waiting while the app was fully closed can still reach you: with Background Notifications enabled, the app polls the cluster on a ~15 minute timer and raises a native notification for the waiting state it missed.

Works with any AI CLI

The ? marker is tool-agnostic. Any AI CLI or agent can drive it through a small generic contract.

The contract

  1. Every command Hive runs in a terminal receives the environment variable HIVE_SESSION_ID - the id of the Hive session the process runs in. You never pass ids around; the CLI reads it from the environment.

  2. The tool reports its state by running the hive CLI:

    When the agent starts waiting for the user:

    bash
    hive internal notify-state --waiting --reason question --prompt "<the question>"
    • --reason is free text, e.g. question, permission, or input.
    • --prompt is optional and feeds the notification's Copy button. If you omit it, Hive uses the agent's last message.

    When the agent is done / no longer waiting:

    bash
    hive internal notify-state --idle
  3. Wire it to hooks. Any tool with a "blocked / waiting" event and a "turn finished" event can call --waiting on the first and --idle on the second. Hook payloads arrive as JSON on stdin, and hive internal notify-state also reads the message / transcript_path fields from that JSON when --prompt is omitted.

Example: Claude Code

Add these to .claude/settings.local.json under "hooks":

  • Notification (permission_prompt / elicitation_dialog) → --waiting
  • Stop and UserPromptSubmit--idle

The idle_prompt notification type should not be wired, so a finished-but-unanswered turn does not produce a false ?.

Requirements

  • The hive CLI must be on PATH. hived installs it automatically next to itself on startup if missing - no user action needed.
  • Run the commands on the same machine as the session; HIVE_SESSION_ID is set for you automatically.

Settings

App Settings -> Notifications -> AI agent setup has a Copy AI setup instructions button. It copies the generic instructions above to your clipboard so you can hand them to any AI CLI.

Hive - remote AI coding agents over WebSocket.