Local Commander agent - disclosure ================================== Package: local-commander-agent (and its platform packages local-commander-agent-darwin-arm64, local-commander-agent-linux-x64 and local-commander-agent-linux-arm64) Service: https://localcmd.app Security contact: peter.mamrukov@localcmd.app This is a dual-use tool. It receives commands over the network and runs them on the computer it is installed on. This file states plainly what it does. 1. What it is ------------- Local Commander lets a person's own AI assistants (ChatGPT, Claude, Cursor or another MCP client) work on that person's own computer: run commands, read and write files, and reach services on localhost. - The person installs it by running the npx command themselves. - It pairs with that person's account at localcmd.app. The person approves the pairing in the browser, or with the install code from their own dashboard. - During setup the person chooses what it may do: - Full Access, the default choice: all connected drives on Windows, "/" on macOS and Linux; - or only folders they select. The choice can be changed later. - Work that comes through localcmd.app is recorded in the account's activity history. - If the account owner turns on full logs, the service also keeps the tool requests and responses for 7 days. - Calls from an AI client on the same computer through direct local MCP (Windows, opt-in) do not go through the service and are not in that history. Commands run with the rights of the signed-in user who installed it. Under Full Access, an authorized AI client can read, change or delete any file that user can, and run any program that user can. Only connect AI clients you trust, and use selected folders if you want less. 2. What it puts on the computer ------------------------------- Windows (per user, no administrator rights needed): - %LOCALAPPDATA%\LocalCommander\ - Versions\\ - the runtime: LocalCommanderAgent.exe, OwnerBridge.exe, JobHost.exe, node.exe (bundled Node.js), agent.mjs, NODE-LICENSE.txt and runtime-manifest.json, plus the command-line files in bin\. - current.json - which version is installed. - Agent\ - pairing keys (protected with Windows DPAPI), the encrypted operation journal, settings, and host-memory.json: a plain-text list of the last 32 commands run and their folders. - bin\localcommander.cmd and bin\localcommander-monitor.ps1 - command shims. The bin folder is added to the user's PATH (HKCU\Environment). - Monitor\ - the local status monitor's data, including short previews of commands. - LocalMcp\ - only if direct local MCP is turned on. - Audit\ - only if the person turns on the local content audit with `localcommander audit`; kept 7 days, at most 512 MB. - Autostart: the value "LocalCommanderAgent" under HKCU\Software\Microsoft\Windows\CurrentVersion\Run, which runs ">\LocalCommanderAgent.exe" run when the user signs in. - Start menu shortcut "Local Commander Monitor". It runs PowerShell with -ExecutionPolicy Bypass -File bin\localcommander-monitor.ps1 to open the local status monitor. macOS and Linux (per user, no root): - macOS: ~/Library/Application Support/LocalCommander/Runtime/LocalCommander/ - Linux: ~/.local/share/LocalCommander/Runtime/LocalCommander/ - versions// - the runtime: node (bundled Node.js), agent.mjs, lifecycle.mjs, posix-host, job-host.mjs, NODE-LICENSE.txt, manifest.json, and on macOS owner-store. - current and previous - links to the active and previous version. - Agent/ - pairing state, the encrypted operation journal and host-memory.json, as on Windows. - Monitor/ as on Windows; on macOS also agent.log. - The key that protects the pairing state is kept in one of three places: - the macOS Keychain; - on Linux, the Secret Service; - on Linux without a Secret Service, the owner-only file Agent/owner-key.dat. - Autostart as a per-user service named app.localcmd.agent: - macOS: ~/Library/LaunchAgents/app.localcmd.agent.plist (launchd) - Linux: ~/.config/systemd/user/app.localcmd.agent.service (systemd user unit) 3. What runs in the background ------------------------------ Windows: - LocalCommanderAgent.exe - a small launcher. It starts the bundled node.exe with agent.mjs, with no window. - node.exe agent.mjs - the agent itself. It keeps one outbound connection to localcmd.app. - JobHost.exe - started for each command. It runs that command inside a Windows Job Object, so that cancel and timeout stop the whole process tree. - OwnerBridge.exe - started when needed for: - DPAPI protection of the agent's keys; - the local access and folder choice windows; - reading files for the file tools; - screenshots. - Windows tools it calls: - reg.exe - autostart value and the computer's MachineGuid; - tasklist.exe - check whether a command's supervisor is still running; - taskkill.exe - stop; - clip.exe - copy the local audit recovery key to the clipboard; - explorer.exe - open the pairing page. - PowerShell is used: - at setup, with -EncodedCommand, to create the Start menu shortcut and change the user PATH; - to check whether the agent process is still the same process; - for the full-log notice; - to run .cmd and .bat files that a command asks for (plain -Command). Windows with Smart App Control on (read at each start: VerifiedAndReputablePolicyState = 1 under HKLM\SYSTEM\CurrentControlSet\Control\CI\Policy): - LocalCommanderAgent.exe, JobHost.exe and OwnerBridge.exe are not started; they stay in the Versions folder. - Autostart: the "LocalCommanderAgent" Run value runs "%SystemRoot%\System32\conhost.exe" --headless ">\node.exe" --use-system-ca ">\agent.mjs" run, so no window opens. - node.exe agent.mjs job-host - started for each command instead of JobHost.exe. It follows the command's processes with PowerShell (Get-CimInstance Win32_Process) and stops them on cancel, timeout or when the agent exits. A process that detaches between two checks can keep running, and the number of processes is not capped. If the agent stops while a command runs, the command's result stays unknown, and its place in the limit stays taken, until Windows restarts. - The agent's keys are encrypted (AES-256-GCM) with a random key in Agent\owner-key.dat instead of DPAPI. icacls.exe limits the Agent folder to the user and SYSTEM, and whoami.exe reads the user's SID for that. The key file stays in use if Smart App Control is turned off later. - node.exe reads files for the file tools. - Access is chosen in the console that runs setup or configure-access. There are no access or folder windows and no screenshots; PowerShell lists the drives for Full Access. macOS and Linux: - node agent.mjs, started by launchd or systemd as the signed-in user. - Each command runs under posix-host and job-host.mjs, which stop its processes on cancel or timeout: - on macOS, as a temporary launchd job, with a private Unix socket in a temporary folder; - on Linux, as a temporary systemd user unit named lc-command-.service. - owner-store (macOS only) - reads and writes the agent's key in the Keychain. - System tools it calls: - launchctl or systemctl - the service and command jobs; - ioreg or scutil - computer identity (macOS); - secret-tool or gdbus - the Linux key; - osascript, open or xdg-open - local windows and the pairing page; - notify-send - notices on Linux; - screencapture and sips - screenshots on macOS. 4. Network ---------- - Outbound only, to the service origin (https://localcmd.app): - pairing over HTTPS (/api/pairings); - then one WebSocket to wss://localcmd.app/api/agent/relay. - Commands, their results and screenshots travel over this connection. - No inbound ports by default. - On Windows, if the person turns on direct local MCP (`localcommander mcp on`), the agent also listens on 127.0.0.1 on a random port, for AI clients on the same computer. - The localhost tools make HTTP requests to services on 127.0.0.1 that the person's AI client asks for. - Commands the person's AI client runs may of course use the network themselves. - The package also contains code for an optional network-connection (proxy/VPN) feature. It is switched off in this package and cannot be turned on from it. 5. What it reads outside its own folders ---------------------------------------- - Computer identity: the Windows MachineGuid (/etc/machine-id or IOPlatformUUID on Linux and macOS) and the computer name. - The identifier is sent only as a salted hash, per device. - The computer name is sent as is. - Screenshots: on Linux, to find the display, it reads `systemctl --user show-environment` and /tmp/.X11-unix, and passes ~/.Xauthority to the capture tool. - Screenshots are available only under Full Access, and only for accounts that have them turned on. - The owner can turn them off locally with `localcommander screenshot off`. - There is no prompt for each capture. - Model token counts: agent 0.3.67 and later do not scan AI-client session files. Token statistics come only from optional OpenTelemetry exports configured by the person in Claude Code or Codex and sent directly to the service. The agent is not involved. - Older agents through 0.3.66 contain a session-file reader. The service defaults its per-computer choice to off; an older enabled installation needs updating to remove it. - On startup, the new agent removes only its old private optimization/token-usage.json cache of file offsets and attribution IDs. Existing cloud totals are retained. - New session, project and task attribution formerly derived from those files is no longer collected. Historical attribution remains historical; missing new attribution is unknown. - Nothing else on its own. The agent does not read browser data, saved passwords, SSH keys or other credential files by itself. Other files are read only when an authorized AI client asks for them, within the access the person granted. 6. What it never does --------------------- - It does not install itself. A person runs the install command, and setup asks them to choose access. - Before pairing it runs no commands and reads no files for anyone. - Pairing sends only the agent's public key, its version and, if given, the install code. - Completing the pairing sends the computer name. - The agent refuses to run without a completed pairing. - On macOS and Linux, setup registers the per-user service before pairing; the agent it starts still refuses to run until paired. - It needs no administrator or root rights and installs no driver or system service. - It opens no inbound port unless the person turns on direct local MCP (Windows, 127.0.0.1 only). - It is not hidden: it appears in Task Manager or the process list, in the autostart entry and in the person's account at localcmd.app, where the computer can be removed at any time. 7. How to remove it completely ------------------------------ First remove the computer in your account at localcmd.app (Computers), so it can no longer receive work. Then run the same npx command you installed with, followed by `uninstall`: npx local-commander-agent@latest uninstall --purge-state Without --purge-state the pairing is kept, so a reinstall can reuse it. Windows - `uninstall` does the following: - stops the agent; - removes the autostart value, the Start menu shortcut, the PATH entry, the command shims, Versions\ and current.json; - with --purge-state, also removes Agent\. What remains can be deleted by hand: the %LOCALAPPDATA%\LocalCommander folder, with Monitor\, LocalMcp\, Audit\ and the empty bin\. macOS and Linux - `uninstall` does the following: - stops and removes the per-user service, its unit or plist, and the current and previous links; - with --purge-state, also removes Agent/ and, on Linux, the Secret Service key. To remove the rest: - delete ~/Library/Application Support/LocalCommander (macOS) or ~/.local/share/LocalCommander (Linux); - on macOS, delete the "app.localcmd.agent.state.v1" item in Keychain Access. 8. Unsigned helpers and how to check them ----------------------------------------- The Windows helpers (LocalCommanderAgent.exe, OwnerBridge.exe, JobHost.exe) are not code-signed. This is a deliberate decision, and Windows may show them as from an unknown publisher. - They are compiled from C# source with the .NET Framework compiler (csc.exe) on a pinned toolchain. A post-build step fixes the build timestamp and assembly ID, so the same source gives the same bytes. - On macOS and Linux, posix-host is compiled from C source. - On macOS, owner-store is a pinned prebuilt binary, built from Objective-C source. To check a copy: - The package's runtime manifest lists the SHA-256 of every runtime file: runtime-manifest.json in the Windows package, runtime/manifest.json in the macOS and Linux packages. Install and update refuse a missing or changed file. - The SHA-256 sums of every released package and runtime are recorded with each release. Ask the security contact for the sums of any version. 9. Antivirus and registry history --------------------------------- - October-November 2026: behaviour-based antivirus (Kaspersky, PDM:Trojan) quarantined JobHost.exe on a customer's computer. This happened with versions 0.3.41 and 0.3.58. When the helper is removed, commands stop; file tools keep working. - November 2026: Kaspersky behaviour detection removed or blocked the unchanged JobHost.exe of 0.3.64 and later (SHA-256 de3e6a4e8a561431c7e696f5267d79625635138482e02c91b9db4936e013b201) after database updates: on our Kaspersky Endpoint Security test computer and on customers' Kaspersky 21.26, including PDM:Exploit.Win32.Generic on Kaspersky Premium on 15 November. Kaspersky could not reproduce it in its own test and rejected our Allowlist Program application on 16 November without giving reasons. The detection is not resolved; current status: https://localcmd.app/security#antivirus - Late October 2026: npm removed version 0.3.52, and GitHub advisory GHSA-7j62-5j84-72fv lists this package as malware. The advisory uses npm's generic malware text and does not describe any behaviour. Version 0.3.52 had added the token-count reader described in 5. The npmjs.com account was suspended, and the package is now distributed through the GitLab package registry. What changed in response: - 0.3.63: `update` repairs a runtime that antivirus damaged. - 0.3.64: - JobHost.exe no longer starts a command suspended and then resumes it; - .bat and .cmd files that commands run go through plain PowerShell -Command, not -EncodedCommand; - the helpers carry version information and are built reproducibly; - every runtime file is pinned in the runtime manifest; - the pairing page no longer opens through rundll32. - November 2026: model token counts became off unless the account owner turns them on for a computer. Version 0.3.67 removed the session-file reader (#762). - This file and the npm dual-use declaration ("contentPolicy": {"class": "dual-use"}) were added. - 0.3.68: a missing helper is reported; the dashboard shows "commands unavailable" and the account owner gets one email. With Smart App Control on, the agent runs without its own helpers. - Since 15 November 2026 every Windows package must pass Microsoft Defender (real-time protection on) and ClamAV, on the archive and on each file inside it, before it can be published; 0.3.74 is the first release published this way. A Kaspersky Endpoint Security test computer runs a real command through JobHost.exe every six hours (while our checking computer is on) and alerts us to any new detection. - JobHost.exe is kept byte-identical across releases, so a vendor's decision about the file keeps applying. To report a detection or a security problem, write to peter.mamrukov@localcmd.app with your version, the product name and the exact detection text.