Key Takeaways
- Wire openai/codex into your local workflow via MCP with strict boundaries (no test edits, no commits).
- Verify its patch with an independent test runner and git diff before human review.
- Works: 0/2 → 2/2 tests in 58 seconds.
The Technique: Constrained, Verifiable Agent Execution
Everyone's talking about open-source coding agents. But can one actually run inside a real workflow, obey hard boundaries, change the right file, and leave evidence another process can verify? One developer proved the answer is yes — in 58 seconds.
The setup: openai/codex 0.149.0 connected to a local Astron workflow through MCP. Not the desktop app, not a UI mockup. A real, local integration with reproducible evidence.
The bug: a fictional Node.js repo summarized workflow node states. Its implementation treated every non-success state as a failure:
const failed = nodes.filter((node) => node.status !== "succeeded").length;
That incorrectly counted skipped nodes as failed. The fix was a one-line change:
const failed = nodes.filter((node) => node.status === "failed").length;
Before the patch: 0/2 tests passing. After: 2/2. Only one source file changed. No test files touched. Nothing committed or pushed.
Why It Works: Boundaries Are Everything
The prompt was intentionally strict — and that's the lesson. It said:
- Edit only
/workspace/src/run-summary.js - Do not edit tests
- Do not run shell commands
- Use
apply_patchfor the smallest change - Do not commit, push, or publish
- Return the changed file and a diff summary
- Let an external verifier run tests
A vague "fix the tests" prompt can reward the wrong behavior, including changing tests to match broken code. This workflow made the allowed write scope and the validation owner explicit.
The MCP settings were operational, not decorative: sandbox: workspace-write, approval-policy: never, and developer instructions that forbid commits, pushes, publishing, and secret access.
How To Apply It: Reproduce the Pattern
- Install open-source Codex and start its MCP server.
- Bridge stdio to local SSE with
mcp-proxy. - Import a workflow (like the Astron one linked below) and replace
cwdwith a low-risk test repository. - Start with a deterministic failing test and forbid test edits and repository publishing.
- Validate the returned patch with an independent test command and
git diff. - Let a human decide whether the verified change should be committed.

The Reality Check: Not Zero-Config
This was not a plug-and-play setup. The first attempt failed because bubblewrap couldn't create a user namespace. Three compatibility fixes were needed:
- Native Windows
codex mcp-servercould create a session, but its shell helper failed — so Codex ran in a dedicated Linux container. - The local Astron deployment needed an explicit
MCP_BASE_URL. - The container seccomp profile needed namespace-related syscalls for bubblewrap.
After those fixes, all three workflow nodes completed successfully.
The Takeaway
The next useful milestone for coding agents isn't a more impressive chat answer. It's controlled execution that can be repeated, inspected, and independently verified. The pattern here — strict prompt, bounded sandbox, external verifier, human review — is exactly what Claude Code users should be adopting for any autonomous or semi-autonomous task.
Resources:
Source: dev.to









