Purpose
PatchWarden connects ChatGPT with local AI coding agents (Codex CLI, Claude Code, OpenCode, etc.): users first discuss ideas and plans in ChatGPT, then hand the approved plan to a local Agent for implementation. It is not a general-purpose remote Shell, but a controlled, verifiable, auditable agent execution channel, focused on solving the security, evidence, and acceptance problems of "letting a remote AI control a local development environment."
Main Capabilities
PatchWarden builds multiple boundaries into the execution chain:
- Workspace boundary: tasks can only run within the configured workspaceRoot.
- Agent boundary: only Agents already installed and configured on the local machine are invoked.
- Command boundary: verification commands must match the allowlist.
- Real Diff: does not rely solely on the Agent's natural language summary.
- Independent verification: verification steps are recorded separately from task execution.
- Audit records: retain request / task / lineage / audit status.
- Human acceptance: the final acceptance action is bound to the current evidence, rather than merely modifying JSON status.
It is designed to answer questions like these: When an Agent says "tests passed," is there independent evidence? Which files were changed, and did it exceed the approved scope? Ultimately, who accepted this change based on what evidence?
How to Use
Download the Windows x64 installer or portable version from the Latest Release. If the current installation package is not code-signed, Windows SmartScreen may warn of an unknown publisher; you can first verify the installation package using the SHA-256 checksum file in the same Release. Running from source or npm requires Node.js 20+, and it is recommended to also install Git to generate reliable Diffs.
It is recommended not to use the disk root directory, user home directory, desktop, or downloads directory directly as workspaceRoot; instead, specify a dedicated project directory.
After opening PatchWarden Desktop, at least one Agent should show as invocable; if the CLI is not yet logged in, first complete login in a separate terminal, then return to PatchWarden and re-detect. In "Getting Started / Advanced Console," confirm that the workspace, Agent, and Core service are working properly. Even if ChatGPT has not yet been connected, the local execution boundary can be verified separately first.
Connecting ChatGPT Web: local PatchWarden needs to be accessed through the secure MCP Tunnel / custom app method currently supported by OpenAI. Prepare tunnel-client; create a dedicated Core Tunnel named PatchWarden; use a dedicated runtime key with Tunnels Read + Use permissions; configure and verify it in PatchWarden's "Settings → MCP & Tunnels"; add PatchWarden in ChatGPT Developer mode, select No Auth for Authentication; retain a confirmation policy appropriate to the workspace's risk level.
Related security notes: the runtime key corresponds to CONTROL_PLANE_API_KEY, not an ordinary OPENAI_API_KEY; OPENAI_ADMIN_KEY can be used to manage Tunnels, but should not be used as a long-running key; do not enter the runtime key into ChatGPT's Authentication field; Direct is an optional second Tunnel, and should only be created when Direct tools are needed; if enabling the local HTTP MCP directly (without going through a stdio Tunnel), you must first configure PATCHWARDEN_OWNER_TOKEN; anonymous /healthz returns only minimal status, while detailed health and /mcp both require the owner token. The Tunnel runtime key is a local secret; do not write it into the README, prompts, screenshots, or Git repositories.
It is recommended to test only in a disposable Demo repository the first time, and not to just look at the Agent saying "done." After the audit passes, the task is usually still ready_for_review, and authoritative acceptance needs to be performed in a local TTY.
Applicable Scenarios
Suitable for workflows where "I already know what to do, and now I need a controlled execution layer": planning and supervising local development tasks in ChatGPT, continuing to use Codex CLI / Claude Code / OpenCode as the actual executors, while not giving the remote model an unrestricted Shell.GPT, the local execution boundary can also be verified separately first.
Connecting ChatGPT Web: local PatchWarden needs to be accessed through the secure MCP Tunnel / custom app method currently supported by OpenAI. Prepare tunnel-client; create a dedicated Core Tunnel named PatchWarden; use a dedicated runtime key with Tunnels Read + Use permissions; configure and verify it in PatchWarden's "Settings → MCP & Tunnels"; add PatchWarden in ChatGPT Developer mode, select No Auth for Authentication; retain a confirmation policy appropriate to the workspace's risk level.
Related security notes: the runtime key corresponds to CONTROL_PLANE_API_KEY, not an ordinary OPENAI_API_KEY; OPENAI_ADMIN_KEY can be used to manage Tunnels, but should not be used as a long-running key; do not enter the runtime key into ChatGPT's Authentication field; Direct is an optional second Tunnel, and should only be created when Direct tools are needed; if enabling the local HTTP MCP directly (without going through a stdio Tunnel), you must first configure PATCHWARDEN_OWNER_TOKEN; anonymous /healthz returns only minimal status, while detailed health and /mcp both require the owner token. The Tunnel runtime key is a local secret; do not write it into the README, prompts, screenshots, or Git repositories.
It is recommended to test only in a disposable Demo repository the first time, and not to just look at the Agent saying "done." After the audit passes, the task is usually still ready_for_review, and authoritative acceptance needs to be performed in a local TTY.
Applicable Scenarios
Suitable for workflows where "I already know what to do, and now I need a controlled execution layer": planning and supervising local development tasks in ChatGPT, continuing to use Codex CLI / Claude Code / OpenCode as the actual executors, while not giving the remote model an unrestricted Shell.
Limitations and Boundaries
PatchWarden does not replace Codex / Claude Code / OpenCode; it does not automatically expose all local files to ChatGPT; it does not treat an Agent's natural-language "tests passed" as final evidence; and it should not be used to bypass existing local security policies. It is better suited for controlled execution, rather than replacing a complete requirements analysis or product decision-making process.
Direct is an optional restricted editing capability, not a read-only verification channel; it provides file editing capabilities constrained by workspace boundaries, sensitive paths, and confirmation policies (including patching, creation, moving, and deletion), and should be enabled only when explicitly needed, with manual confirmation retained. When it is not enabled, do not reference it in prompts.
Common issues: When an Agent is detected but cannot be invoked, first run the corresponding CLI in a separate terminal to complete login and basic model configuration, then return to PatchWarden to re-detect. When Watcher / Core status is abnormal, first perform the normal start/restart process through the advanced console, and do not directly force-kill an unknown PID. When Tunnel is abnormal, first confirm that the local PatchWarden is healthy, then check whether Tunnel is connected to the correct profile, and whether the ChatGPT side is using a currently supported MCP/custom app connection method. When a command does not match the allowlist, check whether it actually exists in the project and matches the allowed command configuration, and do not temporarily relax it to an arbitrary Shell just to let the task pass.
PatchWarden's core principle is "minimal capability + evidence first." The project uses the MIT license, See LICENSE. PatchWarden is an independent open-source project, is not affiliated with OpenAI, Anthropic, or OpenCode, and is not endorsed by them.