Ask User a Question; May Call or Ring Their Phone If Unanswered
ask_userAsk for an unresolved decision or missing input. Prefer this over an in-app question when the user requests Pushary or mobile contact, is away, or work is unattended. Use it when the user asks you to call, phone or ring them if you get stuck or blocked. Supports confirm, select and input. Delivery follows account policy. When the reply includes phoneCall, Pushary may phone the person who can answer if the question is still unanswered, and records their answer; without phoneCall no call is planned. Waits at most 48 seconds and may return at once. While the reply is pending and has no handoffAction, keep waiting with wait_for_answer and the same correlationId. A poll ending does not cancel the question. Returns state, answer, delivery and handoff fields; answerUrl is optional. Sends a real question; it does not authorize other actions.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"question": "<question>"
},
"name": "ask_user"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | MACHINE-POPULATED. The working directory a hook resolved the rule for toolPath against, so a relative path rule resolves the same way here. Any other value is ignored. If you are a model deciding to call this tool, omit this field. | |
| env | No | Set to "test" from a test suite. The question is stored and returned as pending, and nothing is delivered to a phone, browser or Slack. The X-Pushary-Env: test header does the same for every call on the connection. | |
| tags | No | Deliver only to subscribers that have any of these tags. | |
| type | No | Question type: confirm renders yes/no buttons, select renders the options list, input renders a free-text field. | confirm |
| wait | No | true (default) blocks until the user answers or the timeout fires. Set false to return immediately with a pending correlationId and poll it yourself via wait_for_answer. | |
| action | No | The concrete operation about to happen, one line. Shown as the Action line. Cut to 500 chars. | |
| intent | No | The user's stated task (from their last prompt), one line. Shown as the Intent line so the user can see why the agent stopped. Cut to 500 chars. | |
| blocker | No | The single gating reason the agent stopped, one line. Shown as the Blocker line. Cut to 500 chars. | |
| context | No | One or two sentences about what the agent is working on, shown above the question so the user can decide without opening the terminal. | |
| options | No | The 2 to 6 choices for a select question. Required when type is "select", ignored otherwise. The answered value is the chosen option string, or the text the person typed instead when allowOther is true. | |
| repoKey | No | Stable repository identity for the working directory, e.g. "github.com/acme/api". Lets an approval routing rule scoped to one repository avoid governing another. Optional; omit it and only workspace-wide routing rules apply. | |
| question | Yes | The complete question, up to 8000 characters. Preserve every point. Notifications show a short preview; the answer interface shows the full question. | |
| toolName | No | The tool this approval is for (e.g. "Bash"), so the user can choose to always-allow it. | |
| toolPath | No | MACHINE-POPULATED. Exact absolute path of the file a file tool call writes, as the hook matched its rule on. Any other value is ignored. Models must omit it. | |
| agentName | No | Name of the agent asking, format "{Agent} - {project}" (e.g. "Claude Code - myproject"). Shown in the notification title so the user knows which session needs them. Falls back to the MCP client name if omitted. Cut to 100 chars. | |
| machineId | No | Stable machine id of the asking agent, so two machines never collapse into one session. | |
| questions | No | ONE question, in the richer Claude-compatible shape: a header, per-option descriptions, multiSelect, and an optional write-in. Exactly one keeps already-installed clients answerable; asking several means several calls. Runtime-populated; ordinary callers should omit it and use question/type/options. | |
| requestId | No | MACHINE-POPULATED. The CALLER's own identifier for one logical invocation, used only when the runtime supplies no toolUseId. Mint it once, outside your retry loop, and send the same value on every attempt, so three retries of one ask become one decision. Do NOT derive it from the question text or reuse it across two deliberate asks: both collapse a real second question into the first one's answer. If you are a model deciding to call this tool, omit this field. | |
| scopePath | No | Set ONLY when this approval exists because the path falls outside the scope the user ratified via propose_scope. Approving then widens the run scope to include this exact path, so the user is not asked again for the same area. | |
| sessionId | No | Opaque per-session id of the asking agent, so parallel sessions are attributed separately. | |
| timeoutMs | No | How long this call blocks, in milliseconds (up to 55000 is accepted; one call blocks at most 48 seconds). Defaults to the site policy timeout. Ordinary questions stay open until answered or cancelled; through a connector they close 10 minutes after they are sent. A timeout ends this poll only; follow up with wait_for_answer. | |
| toolUseId | No | MACHINE-POPULATED. The agent RUNTIME's own identifier for the tool call this approval gates, forwarded verbatim by a hook that received it. Do NOT invent, guess, derive, or reuse a value: two different questions sent under the same id collapse into one, and the second one never reaches a human. If you are a model deciding to call this tool, omit this field. | |
| actionBody | No | The diff (Edit/Write) or full command (Bash/apply_patch), secret-redacted and size-capped. Rendered as a collapsible detail block; never used as the push body. | |
| allowOther | No | Select only, without questions: true also lets the person type an answer of their own, which is then the answered value. Set it unless your options cover every answer you could act on; omit it only then. | |
| toolTarget | No | Compact target of the tool call (e.g. the command head "git push" for Bash, or a file extension like ".ts" for Edit/Write). Used to mine policy suggestions. | |
| waitEndsAt | No | MACHINE-POPULATED. When the agent hook stops waiting live and hands control back to the terminal. The question may remain answerable after this time. Ordinary callers should omit it. | |
| callbackUrl | No | Webhook URL that receives a POST with the answer when the user responds, signed with the X-Pushary-Signature header. Useful when the agent process may exit before the answer arrives. | |
| externalIds | No | Deliver only to subscribers matching these external IDs. | |
| pausedAware | No | MACHINE-POPULATED. true from a hook that ends a paused approval exactly as the same approval unanswered after its full wait. Any other value is ignored. If you are a model deciding to call this tool, omit this field. | |
| placeholder | No | Hint text shown inside the free-text field for input questions | |
| matchedRoute | No | MACHINE-POPULATED. The approval routing rule the hook matched on the machine, so this approval reaches the person that rule names. If you are a model deciding to call this tool, omit this field. | |
| questionOwner | No | MACHINE-POPULATED. Ownership supplied by the supported personal Codex bridge. Models must omit this field. | |
| subscriberIds | No | Deliver only to these subscriber IDs. Omit all targeting fields to reach every connected device. | |
| permissionMode | No | MACHINE-POPULATED. The agent runtime's own permission or approval mode for the tool call this approval gates, recorded with the decision. Any other value is ignored. If you are a model deciding to call this tool, omit this field. | |
| callFingerprint | No | MACHINE-POPULATED. A hook's fingerprint of the exact tool call, so the same call made again after the hook stopped waiting rejoins this question instead of asking twice. Any other value is ignored. If you are a model deciding to call this tool, omit this field. | |
| routingToolName | No | MACHINE-POPULATED. The tool call this approval is about, sent by a client whose agent applies its own grant, and used only to match approval routing rules when toolName is absent. It never offers an always-allow rule. Any other value is ignored. If you are a model deciding to call this tool, omit this field. | |
| sessionToolAware | No | MACHINE-POPULATED. Set by a Pushary hook whose engine applies a session tool grant with its risky-command ceiling, so the grant is only offered where it takes effect. If you are a model deciding to call this tool, omit this field. | |
| routingToolTarget | No | MACHINE-POPULATED. The compact target that goes with routingToolName, used only to match approval routing rules. Any other value is ignored. If you are a model deciding to call this tool, omit this field. | |
| agentPromptFollows | No | MACHINE-POPULATED. false from a hook whose agent runs nothing and shows no prompt of its own when this approval is refused, so the approval is stored without a push past the question cap instead of refused. If you are a model deciding to call this tool, omit this field. | |
| localSurfaceAvailable | No | MACHINE-POPULATED. false from a hook that cannot show its own approval prompt for this call, so the phone is asked every time and never spared for presence at the keyboard. Any other value is ignored. If you are a model deciding to call this tool, omit this field. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Echoed when the call was test traffic. | |
| held | No | Present when the question was stored but deliberately not delivered: test traffic, or a permission ask with no toolName and no sessionId. | |
| hint | No | What to do next, when there is a next step. | |
| mode | No | The site delivery mode that stopped this call from waiting. | |
| note | No | Free text the user added alongside their answer. | |
| type | Yes | The question type that was rendered. | |
| value | No | The user's answer: "yes" or "no" for confirm, the chosen option for select (or the text they typed instead, when the select was asked with allowOther), the typed text for input. | |
| paused | No | True when nothing was sent because the last approvals in this session went unanswered. Withdraw the question, then end the call as it would end unanswered. | |
| status | No | The question state. Only pending is a live unanswered wait; cancelled, expired, missing, and unavailable must not be described as timeouts. | |
| warning | No | Present only when no channel is connected, naming what the user has to connect. | |
| answered | No | True once the user responded. Absent on the wait:false path, where nothing was awaited. | |
| delivery | No | Per-channel reach for the push carrying this question. | |
| overflow | No | True when the question was stored past the push cap: it is listed and answerable, but no push was sent for it. A wait on it is not a wait anyone was asked during, so a rule that approves on silence must not apply. | |
| question | Yes | The question exactly as the user saw it. | |
| routedTo | No | Who the enforced route sends this decision to, for display, when requesterMayAnswer is false. | |
| timedOut | No | True when the initial wait ended while the question was still live. Poll once with wait_for_answer, then follow handoffAction when present, otherwise nextAction. | |
| answerUrl | No | Optional signed-in dashboard page where the user can answer this question. | |
| noDevices | No | True when no phone, browser, or Slack channel could receive the question. Do not wait; follow handoffAction immediately. | |
| phoneCall | No | Present only when Pushary plans to phone someone who can answer this question if it stays unanswered. Without it, no call is planned. The spoken answer arrives through wait_for_answer: while the reply is pending and has no handoffAction, keep waiting with the same correlationId. | |
| nextAction | No | Backward-compatible next step: keep waiting while pending or ask in the current client. Follow handoffAction first when present. | |
| suppressed | No | True when the PHONE push was deliberately held because a terminal on this machine is active, or, alongside paused, because nothing was sent at all. It says nothing about the notch, the dashboard or Slack, which are unaffected and may still be showing this question. A caller with no screen of its own should treat it as the terminal's to answer; a caller that can render the question itself should keep waiting unless paused is true. | |
| waitEndsAt | No | When the agent hook stops waiting live. On an idempotent replay this is the original question's deadline, which the hook must reuse. | |
| typedAnswer | No | ||
| answerSource | No | Recorded answering surface, when known. Missing provenance is not proof of a phone answer; sandbox is simulated. | |
| deliveryMode | No | Effective delivery policy for this decision. | |
| correlationId | Yes | Id of the question that was created. Pass it to wait_for_answer to keep waiting, or to cancel_question to retract it. | |
| handoffAction | No | Race-safe directive for updated clients. Takes precedence over nextAction: cancel before asking in the current client, or stop the handoff. | |
| policyTimeoutMs | No | Policy wait window in milliseconds. Callers must also honor their host deadline. | |
| expiresInSeconds | No | How long the question stays answerable. | |
| requesterMayAnswer | No | False when a Team approval route that enforces who answers sends this decision to other people. Do not answer it in the current client or hand it to a local prompt: only the route's approvers can answer it. | |
| phoneCallNotPlanned | No | Present only when the user who asked has phone calls set up and no call can be planned for this question. If they asked to be called, tell them why; never promise a call. Other reasons no call is planned are in hint only. |