# OpenHands

Source: https://pushary.com/docs/agents/guides/openhands
Last updated: 2026-11-23

> Approve OpenHands from your phone. Before OpenHands runs a command or edits a file, Pushary sends it to your phone and waits for your yes. Miss it and Pushary calls you.

OpenHands stops when it needs you. You're not at your desk, so it sits there.

Pushary sends that moment to your phone. Before OpenHands runs a terminal command or edits a file, your Pushary rules decide. The risky ones wait for your yes or no. Tap yes and it keeps going.

* **Your phone.** The step shows up as a push. Approve or deny in one tap.
* **A call if you miss it.** No answer after a minute? Pushary calls you and reads the step out. Say yes, no, or tell the agent what to do instead. See [phone calls](/docs/agents/phone-calls).
* **Your team.** On Team, a rule can send risky steps to your lead instead of you. See [Team](/docs/agents/team).

Nobody answers? The step does not run. A missing answer is never a yes.

| Plan      | Price                    | Call minutes a month |
| --------- | ------------------------ | -------------------- |
| Agent     | $9.99 a month            | 10                   |
| Agent Pro | $19.99 a month           | 20                   |
| Team      | $59 a month for 5 people | 60                   |

Every plan starts with 3 days free. You also need the Pushary app on your phone, or the Mac app, signed in to the same account.

## Two ways to connect [#two-ways-to-connect]

Pick one. Using both asks you twice.

|                                                                | Pushary setup                                    | Pushary plugin                                            |
| -------------------------------------------------------------- | ------------------------------------------------ | --------------------------------------------------------- |
| Install                                                        | `npx -y pushary@latest setup --agents openhands` | Install `github:Pushary/openhands-plugin` in Agent Canvas |
| Approve commands and edits from your phone                     | Yes                                              | Yes                                                       |
| The agent can ask you questions and send a push when it's done | After you add the MCP server (below)             | Yes                                                       |
| Where your key lives                                           | `~/.pushary/config.json`, saved by setup         | `PUSHARY_API_KEY` in the backend's environment            |
| Best for                                                       | Agent Canvas on your own computer                | A self-hosted backend, or the SDK                         |

## Connect with setup [#connect-with-setup]

This is for Agent Canvas running on your computer: the desktop app, `npm install -g @openhands/agent-canvas`, or `npx`. Install Agent Canvas and open it once first. Then run:

```bash
npx -y pushary@latest setup --agents openhands
```

On Windows PowerShell, run `npx.cmd -y pushary@latest setup --agents openhands`. The CLI needs Node.js 20.17+, 22.13+ or 23.5+.

<Steps>
  <Step>
    ### Scan the QR code with your phone [#scan-the-qr-code-with-your-phone]

    Setup shows a QR code. Scan it with your phone's camera or the Pushary app. Sign in or create an account, check the code on your phone matches your terminal, tap **Approve** and allow notifications. If this computer already has a Pushary key, setup reuses it.
  </Step>

  <Step>
    ### Answer the test question [#answer-the-test-question]

    Setup sends a test push, then a test question. Answer it on your phone. The terminal says **You're set** when your answer arrives.
  </Step>

  <Step>
    ### Start a new conversation [#start-a-new-conversation]

    Agent Canvas reads hooks when a conversation starts, so open a new one.
  </Step>
</Steps>

Setup writes one file, `~/.openhands/hooks.json`. Agent Canvas sends it with every new conversation on your computer. If you already had hooks there, setup keeps them and adds its own. It also moves them to the `{"hooks": {"PreToolUse": [...]}}` form if they were written another way, so OpenHands reads both.

### Let the agent ask you questions [#let-the-agent-ask-you-questions]

The hooks handle approvals. To let OpenHands ask you a question or send a push when a long task ends, add Pushary as an MCP server:

1. In Agent Canvas, open **Customize > MCP Servers** and click **Add custom server**.
2. Server type **SHTTP**, URL `https://pushary.com/api/mcp/mcp`.
3. Authentication **Bearer token**, and paste your Pushary key. It's the `pk_...` key in `~/.pushary/config.json`, or create one under [Settings, API keys](https://pushary.com/dashboard/agent/settings).
4. Click **Test connection**, then save. New conversations get the Pushary tools.

## Connect with the plugin [#connect-with-the-plugin]

The plugin bundles everything: the approval hooks, the Pushary MCP server and the Pushary skill. It reads your key from `PUSHARY_API_KEY`.

<Steps>
  <Step>
    ### Get a key [#get-a-key]

    Create a key under [Settings, API keys](https://pushary.com/dashboard/agent/settings), or run `npx -y pushary@latest setup --agents none` to sign in and save one.
  </Step>

  <Step>
    ### Give the backend your key [#give-the-backend-your-key]

    Set `PUSHARY_API_KEY` in the environment of the process that runs the Agent Server, for example `PUSHARY_API_KEY=pk_... agent-canvas`. The approval hook and the MCP server both read it from there.
  </Step>

  <Step>
    ### Install the plugin [#install-the-plugin]

    Open **Plugins** in Agent Canvas and install from source `github:Pushary/openhands-plugin`. Or clone it where Canvas looks for local plugins:

    ```bash
    git clone https://github.com/Pushary/openhands-plugin ~/.openhands/plugins/pushary
    ```

    Start a new conversation.
  </Step>
</Steps>

## Check that it works [#check-that-it-works]

Start a new conversation and ask OpenHands:

```text
Run `touch pushary-check.txt` in the terminal.
```

Your phone gets &#x2A;*Allow bash: touch pushary-check.txt?** from **OpenHands** if your rules ask about it. Tap **Deny**. OpenHands reports the step was rejected and the file is not created. Ask again and tap **Approve**, and it runs.

If your rules let `touch` through, try a step they ask about, such as `git push --force`.

## How it behaves [#how-it-behaves]

* Pushary checks `terminal`, `file_editor`, `planning_file_editor` and `apply_patch`, plus `write_file` and `edit` when OpenHands uses its Gemini tools. A `file_editor` view is a read, so it's treated like any other read.
* OpenHands hooks answer allow or deny, never "ask". So when nobody answers in time, Pushary denies the step and tells the agent why. It never lets it run.
* Pushary runs before OpenHands' own confirmation step. If Pushary has no opinion, for example when it's offline, OpenHands carries on as if there were no hook: with confirmation mode on you get the usual Approve card in Canvas, with it off the step runs.
* The kill switch, deny rules, presets and approval routes work the same as for every other agent. See [policies](/docs/agents/policies).

<Callout type="warn">
  OpenHands Cloud runs your agent in its own sandbox and reads hooks from the repository, not from your computer. We've tested approvals on Agent Canvas and the SDK. In Cloud, add Pushary as an MCP server (Bearer token, your key) so the agent can ask you questions and send a push. Approvals before each command in Cloud aren't tested yet.
</Callout>

## Disconnect [#disconnect]

```bash
npx -y pushary@latest disconnect openhands
```

This removes Pushary's hooks from `~/.openhands/hooks.json` and keeps any of yours. To remove the plugin, uninstall it from **Plugins** or delete `~/.openhands/plugins/pushary`. Remove the Pushary MCP server under **Customize > MCP Servers**.

## Troubleshooting [#troubleshooting]

### OpenHands runs a risky command without asking [#openhands-runs-a-risky-command-without-asking]

Start a new conversation, since hooks load when it starts. Check `~/.openhands/hooks.json` has the `pushary-hook` entries. If you set `OH_PERSISTENCE_DIR`, Agent Canvas reads `hooks.json` from that folder instead, so copy the file there. Then check your rules on the [Policies](https://pushary.com/dashboard/agent/policies) page.

### OpenHands asks nothing in one repo [#openhands-asks-nothing-in-one-repo]

OpenHands reads `.openhands/hooks.json` in the repo first. If that file exists, it doesn't read `~/.openhands/hooks.json`. Copy Pushary's entries from your home file into the repo's file.

### Nothing reaches my phone with the plugin [#nothing-reaches-my-phone-with-the-plugin]

The hook needs `PUSHARY_API_KEY` in the Agent Server's environment. The desktop app doesn't read your shell profile, so start Agent Canvas from a terminal with the key set, or use `pushary setup` instead, which saves the key where the hook finds it.

### A conversation won't start after I turned on Decision cards [#a-conversation-wont-start-after-i-turned-on-decision-cards]

OpenHands' experimental **Decision cards** add a tool called `ask_user`. Pushary has one too. When Pushary is your only MCP server, OpenHands keeps both names as they are, sees two `ask_user` tools and stops with `Duplicate tool names found: {'ask_user'}`. Turn Decision cards off, or add any second MCP server: with two or more, OpenHands names Pushary's tools `pushary_ask_user` and so on, and both work.