How to Detect OpenHands CLI on Employee Laptops
OpenHands is an open-source autonomous coding agent. Its CLI installs as a Python tool with uv or as a standalone binary, so it lands in the user's home folder, not in the software inventory. Here are the traces per OS, a read-only check, and the settings worth a finding.
How to check if OpenHands is installed: look for an openhands command on PATH, the uv tool folder ~/.local/share/uv/tools/openhands (%APPDATA%\uv\data\tools\openhands on Windows), the PyPI packages openhands or openhands-ai, and the files ~/.openhands/agent_settings.json or mcp.json.
What OpenHands is and why security teams care
OpenHands (by All Hands AI) is an open-source agent that writes code, runs commands and browses on its own. The CLI runs it in the terminal with the permissions of the logged-in user; the same project also has a web GUI that usually runs in Docker.
- Python installs. The recommended install is
uv tool install openhands, which keeps its own environment under the uv data folder. A standalone binary from an install script is also offered. - Always-approve mode. By default it asks before each action;
--always-approve(alias--yolo) approves every action, and--llm-approvehands the decision to a model. - Keys in a settings file.
~/.openhands/agent_settings.jsonkeeps the persisted agent settings, which can include the LLM API key.
Where OpenHands leaves traces
| Signal | Windows | macOS | Linux |
|---|---|---|---|
| uv tool environment | %APPDATA%\uv\data\tools\openhands | ~/.local/share/uv/tools/openhands | Same as macOS |
| Command on PATH | openhands.exe (uv puts tool commands in %USERPROFILE%\.local\bin) | ~/.local/bin/openhands (uv), or wherever the install script put the binary | Same as macOS |
| pip packages | openhands or openhands-ai in a Python environment | ||
| Process | openhands, or python running it | ||
| Settings folder | %USERPROFILE%\.openhands | ~/.openhands | ~/.openhands |
| Files inside | agent_settings.json (agent and LLM settings), cli_config.json (TUI preferences), mcp.json (MCP servers) | ||
| Web GUI | Runs as a Docker container; see AI in Docker containers | ||
An empty ~/.openhands folder is weak evidence on its own (other OpenHands tooling can create it), so Kuntur requires one of the settings files, the uv tool folder or the openhands command.
Check one machine
Both checks only read files and the process table. They send nothing over the network, change nothing, and print paths and labels only, never the contents of a settings or credentials file.
Windows (PowerShell)
# Read-only, no network. Run as the user (not SYSTEM). Prints paths only.
# 1. Installed? uv tool environment, the command on PATH, pip packages
Test-Path "$env:APPDATA\uv\data\tools\openhands"
Get-Command openhands -ErrorAction SilentlyContinue | Select-Object Source
if (Get-Command pip -ErrorAction SilentlyContinue) { pip list 2>$null | Select-String -Pattern '^openhands(-ai)?\s' }
# 2. Running now?
Get-CimInstance Win32_Process |
Where-Object { $_.Name -like 'openhands*' -or $_.CommandLine -like '*openhands*' } |
Select-Object ProcessId, Name, ExecutablePath
# 3. Settings folder (file names only: agent_settings.json can hold an LLM API key)
foreach ($n in 'agent_settings.json', 'cli_config.json', 'mcp.json') {
$f = "$env:USERPROFILE\.openhands\$n"
if (Test-Path $f) { $f }
}
macOS and Linux (bash)
# Read-only, no network. Run as the user. Prints paths only.
# 1. Installed? uv tool environment, the command on PATH, pip packages
ls -d "$HOME/.local/share/uv/tools/openhands" 2>/dev/null
command -v openhands
python3 -m pip list 2>/dev/null | grep -Ei '^openhands(-ai)? '
# 2. Running now?
pgrep -fl openhands
# 3. Settings folder (file names only: agent_settings.json can hold an LLM API key)
for n in agent_settings.json cli_config.json mcp.json; do
f="$HOME/.openhands/$n"
[ -f "$f" ] && echo "$f"
done
If developers use pipx or a project virtual environment instead of uv, the package shows up in pipx list or that environment's pip list. A Linux install inside WSL is invisible to the Windows check; see the WSL guide.
Settings worth a finding
| Setting | What it means | What Kuntur reports |
|---|---|---|
LLM API key in agent_settings.json | A long-lived provider key in a plain file | AI_API_KEY_IN_APP_CONFIG (masked) |
Servers in mcp.json | Programs or URLs the agent can call | MCP inventory and MCP findings |
--always-approve / --yolo, --llm-approve | Actions run without a human confirming them | A command-line flag, not a file: only EDR process command lines show it |
--override-with-envs | Uses LLM_API_KEY, LLM_MODEL, LLM_BASE_URL from the environment for that run | Shell-profile keys are reported as AI_API_KEY_IN_SHELL_PROFILE |
Find it across a fleet
The commands above answer the question for one laptop. Across a fleet, run the same read-only checks from the management tool you already use and collect one line per device. These guides show how to deploy a read-only script and read the results; their ready-made scripts cover the most common AI tools, so paste the OpenHands checks from this page into the same script:
- Windows with Intune: Detect AI tools with Intune Remediations (detection-only script, results in the device status column).
- Windows with NinjaOne: Inventory AI tools with NinjaOne (writes a summary to a device custom field).
- macOS with Jamf Pro: Find AI tools with a Jamf Pro extension attribute (plus a Smart Group to act on it).
- macOS with Iru (Kandji): Detect AI tools with an Iru custom script (with an allowlist).
MDM scripts usually run as SYSTEM or root, where %USERPROFILE% and ~ point at the wrong home folder, so loop over every profile under C:\Users, /Users or /home and replace the home path in each check. The Kuntur agent already does this for OpenHands on every endpoint.
How to restrict OpenHands with Intune or Jamf
Kuntur does not block, restrict or uninstall anything. If your policy says OpenHands should not run, the restriction is done with your MDM or with the vendor's own admin controls, and the inventory tells you who the rule will affect before you enforce it.
- Windows (Intune): an App Control for Business or AppLocker deny rule on the binary, by publisher, path or hash, in audit mode first. How to restrict Claude Code with Intune walks through the same steps for another terminal agent; swap in the paths from the table above.
- macOS (Jamf Pro): a Restricted Software record with the exact process name. How to restrict Claude Code with Jamf Pro shows how to find the name on a test Mac and what the record will not catch.
- npm installs run under Node. A rule on the tool's own binary does not apply to
node, and denying Node breaks every JavaScript developer. For node-hosted installs, vendor settings that users cannot override are the more practical control.
A uv install runs a Python interpreter from the tool folder, so a path rule on %APPDATA%\uv\data\tools\openhands (Windows) is more reliable than a rule on openhands.exe. For the Docker-based GUI, the control is your container policy, not the endpoint rule.
How Kuntur detects OpenHands
Kuntur's catalog identifies the OpenHands CLI by the uv tool folder, the openhands command and process, and the agent_settings.json and cli_config.json files. The agent also reads ~/.openhands/mcp.json and checks agent_settings.json for provider keys (masked), for every user profile; MCP servers that OpenHands starts are linked to it. Before November 2026 it appeared only as an unclassified Python CLI.
To check one machine now, the free Kuntur scanner lists OpenHands together with every other AI tool, extension, local model and MCP server it finds:
- Download scan.ps1.
- Read it. It's plain text; here's what it does.
- Check its SHA-256 against the published hash:
Get-FileHash .\scan.ps1 -Algorithm SHA256 - Run it:
powershell -ExecutionPolicy Bypass -File .\scan.ps1
Windows shortcut, if you trust the source (PowerShell)
irm https://app.kuntur.io/scan.ps1 | iexmacOS and Linux (Terminal)
curl -fsSL https://app.kuntur.io/scan.sh | shIt needs no account and no admin rights, writes an HTML report to the Desktop (or home folder) and uploads nothing. You can read scan.ps1 or scan.sh before running it; what it collects is documented.
Across a fleet, the Kuntur agent reports the same inventory for every user profile on Windows, macOS and Linux. You mark OpenHands approved or unauthorized once for the organization, the dashboard shows which machines carry it, and every decision lands in an audit log.
Free for up to 5 endpoints. Pro is US$3 per endpoint per month (or US$30 per endpoint per year) for 10 to 30 endpoints. The trial needs no credit card. Kuntur detects and reports; it does not block or uninstall anything.
FAQ
- Where is OpenHands CLI installed?
- With uv, in
~/.local/share/uv/tools/openhands(%APPDATA%\uv\data\tools\openhandson Windows) with anopenhandscommand in~/.local/bin. The standalone install script installs a binary instead. Settings are always in~/.openhands. - How do I check if OpenHands is installed?
- Run
command -v openhands(orGet-Command openhands), check the uv tool folder, and look for~/.openhands/agent_settings.jsonormcp.json.pip listshows theopenhandsoropenhands-aipackage in a Python environment. - What does OpenHands --always-approve do?
- It approves every action the agent takes, without asking;
--yolois an alias.--llm-approvelets a model decide instead. Both are command-line flags, so they leave nothing in the settings files. - Where does OpenHands store MCP servers?
- In
~/.openhands/mcp.json, managed withopenhands mcp add,list,enableanddisable.
Sources
Detect other AI tools:
Related guides: