<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Sean Kwon]]></title><description><![CDATA[Sean Kwon]]></description><link>https://seanjhkwon.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sat, 07 Nov 2026 11:20:37 GMT</lastBuildDate><atom:link href="https://seanjhkwon.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Four Hidden Config Settings That Stop Token Leaks and Unapproved Writes in OpenAI Codex and Claude Code]]></title><description><![CDATA[When you run OpenAI Codex CLI and Claude Code side by side across a real codebase, the biggest token drains and safety gaps come from default background…]]></description><link>https://seanjhkwon.hashnode.dev/four-hidden-config-settings-that-stop-token-leaks-and-unapproved-writes-in-openai-codex-and-claude-code</link><guid isPermaLink="true">https://seanjhkwon.hashnode.dev/four-hidden-config-settings-that-stop-token-leaks-and-unapproved-writes-in-openai-codex-and-claude-code</guid><dc:creator><![CDATA[Sean Kwon]]></dc:creator><pubDate>Fri, 06 Nov 2026 16:40:35 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6aec235b25aa400062e03c1b/100e02d0-9b7e-4c3f-989f-84afcab3056a.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When you run OpenAI Codex CLI and Claude Code side by side across a real codebase, the biggest token drains and safety gaps come from default background settings that rarely show up in the terminal UI.</p>
<p>Here are four production configuration changes, verified against <code>codex-cli 0.166.0</code> and Claude Code <code>v2.1.277+</code>, that cut wasted polling turns and lock down unapproved writes.</p>
<h2>1. Stop OpenAI Codex From Yielding Every 30 Seconds and Polling Every 1 Second</h2>
<p>By default, when OpenAI Codex runs a build, test suite, or subagent task under <code>code_mode</code>, it yields control back to the model after 30,000 ms (<code>default_exec_yield_time_ms</code>) even if the command is still running. Every yield resends your entire conversation history. Worse, when the model calls <code>wait</code> to check on the running command, it frequently picks a 1,000 ms timeout and polls up to a hundred times during a single slow build.</p>
<p>Add these two blocks to <code>~/.codex/config.toml</code> (template: <a href="https://github.com/seankwon816/foragent-skills/blob/main/templates/codex/config.toml"><code>templates/codex/config.toml</code></a>):</p>
<pre><code class="language-toml">[features.code_mode]
default_exec_yield_time_ms = 300000

[features.multi_agent_v2]
min_wait_timeout_ms = 30000
default_wait_timeout_ms = 120000
max_wait_timeout_ms = 300000
</code></pre>
<p>Setting <code>default_exec_yield_time_ms = 300000</code> raises the initial command yield window to 5 minutes while still returning the instant the command exits. Under <code>[features.multi_agent_v2]</code>, <code>min_wait_timeout_ms = 30000</code> enforces a hard 30-second floor when waiting on subagents.</p>
<p>For shell builds that run longer than 5 minutes, add one line to your repository root <code>AGENTS.md</code>:</p>
<pre><code class="language-markdown">When calling wait on a running command, always pass yield_time_ms &gt;= 60000 (never poll at 1000ms).
</code></pre>
<h2>2. Isolate Custom Claude Code Subagents From Main-Model Quota and Root Instruction Reloads</h2>
<p>Claude Code's built-in <code>Explore</code> subagent skips your <code>CLAUDE.md</code> files on purpose so file lookups stay fast. However, two traps hit teams as soon as they use subagents heavily:</p>
<ol>
<li>Built-in <code>Explore</code> inherits your main session model unless you override it, which burns Opus or Sonnet quota on simple <code>Glob</code> and <code>Grep</code> calls.</li>
<li>Any custom subagent you define in <code>.claude/agents/</code> reloads your full <code>CLAUDE.md</code> hierarchy on every spawn and inherits write permissions unless you lock down its frontmatter.</li>
</ol>
<p>Create <code>.claude/agents/Explore.md</code> with these exact frontmatter fields (template: <a href="https://github.com/seankwon816/foragent-skills/blob/main/templates/subagents/Explore.md"><code>templates/subagents/Explore.md</code></a>):</p>
<pre><code class="language-yaml">---
name: Explore
description: Fast read-only codebase search and git history lookup
model: haiku
effort: low
omitClaudeMd: true
tools: Read, Grep, Glob, Bash(git log *), Bash(git blame *), Bash(git diff *)
---
</code></pre>
<p>Using an explicit <code>tools</code> allowlist instead of <code>disallowedTools: Write, Edit</code> prevents the search worker from mutating files via <code>sed</code> or shell redirection while still allowing read-only <code>git log</code> and <code>git blame</code> inspection.</p>
<h2>3. Run Stateless Cross-Vendor Diff Reviews Before Opening a Pull Request</h2>
<p>Asking the same coding agent session that wrote a feature branch to review its own changes misses obvious bugs because the agent still has its own reasoning trace and assumptions in context.</p>
<p>Run a stateless, read-only review pass on a second model vendor so the reviewer only sees the raw <code>git diff</code> and the files on disk.</p>
<p>When Claude Code writes the branch, run OpenAI Codex CLI's built-in <code>review</code> subcommand:</p>
<pre><code class="language-bash">codex exec review --base main --ephemeral -o /tmp/codex-review.txt \
  "List only concrete bugs, race conditions, and unhandled edge cases with file:line references."
</code></pre>
<p>Example output from <code>/tmp/codex-review.txt</code>:</p>
<pre><code class="language-text">[codex-review] Comparing feat/orders-v2 against main (4 files changed, +142 -19)
  1. [HIGH] src/routes/orders.ts:88: Missing await on releaseInventoryLock()
      inside catch block leaves row lock active until connection timeout.
  2. [MED]  src/schemas/order.ts:34: discountCents allows negative integers
      when promoCode is omitted; add .nonnegative() to Zod schema.
</code></pre>
<p>When Codex writes the branch, pipe the branch diff into Claude Code in non-interactive mode with write tools stripped:</p>
<pre><code class="language-bash">git diff main...HEAD | claude -p \
  "Review this diff against the codebase. Report only concrete bugs and missing edge cases with file:line numbers." \
  --tools "Read,Grep,Glob"
</code></pre>
<h2>4. Gate Destructive Commands and Cross-Repo Agent Handoffs</h2>
<p>When two coding agents work across separate repositories or computers (for example, a frontend Claude Code session on a laptop and a backend Codex session on a desktop), you need both local execution guardrails and a structured channel for cross-agent questions:</p>
<ol>
<li>For local shell commands in Claude Code, use a <code>PreToolUse</code> execution gate (<code>exit 2</code> + <code>stderr</code>). Returning <code>exit 1</code> from a <code>PreToolUse</code> hook only logs a non-blocking warning and lets the command run anyway. To block a destructive command and feed the reason back to the model, exit with code <code>2</code> and write the allowed alternative command to <code>stderr</code> (<code>&gt;&amp;2</code>). For full desktop runtime guardrails (<code>Security RA</code> through <code>RI</code> rules) across macOS and Windows, we built <a href="https://clevagent.io"><strong>ClevAgent</strong></a>.</li>
<li>For direct agent-to-agent calls over MCP (<code>12 messages per call</code>), <a href="https://foragent.io"><strong>ForAgent</strong></a> (<code>https://foragent.io/mcp</code>, listed in the Official MCP Registry as <code>io.foragent/foragent</code>) gives each coding agent a private phone number so you do not have to copy-paste stack traces between your frontend and backend terminals. One agent dials <code>@12</code>, you click <strong>Accept</strong> and <strong>Copy</strong> once to approve the incoming call, and the two agents resolve the schema mismatch directly within a hard cap of <strong>12 messages per call</strong> (plus file transfers up to <strong>25 MB</strong> with a 1-click desktop confirmation prompt). Self-calls between your own agent numbers are always free.</li>
</ol>
]]></content:encoded></item><item><title><![CDATA[How to let Claude Code and Codex talk directly across two computers without copy-pasting logs]]></title><description><![CDATA[How to give Claude Code and Codex private phone numbers over MCP so two sessions can talk directly in 12 turns and share files across computers.]]></description><link>https://seanjhkwon.hashnode.dev/how-to-let-claude-code-and-codex-talk-directly-across-two-computers-without-copy-pasting-logs</link><guid isPermaLink="true">https://seanjhkwon.hashnode.dev/how-to-let-claude-code-and-codex-talk-directly-across-two-computers-without-copy-pasting-logs</guid><category><![CDATA[claude]]></category><category><![CDATA[Developer Tools]]></category><category><![CDATA[ai agents]]></category><dc:creator><![CDATA[Sean Kwon]]></dc:creator><pubDate>Thu, 05 Nov 2026 06:52:55 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6aec235b25aa400062e03c1b/a414d985-0671-4b91-8a1d-90700a2dbd17.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>If you run Claude Code on one repository (say, a frontend app on your MacBook) and Codex on another repository (say, a backend API on a desktop or Linux box), debugging an integration bug usually turns you into a human clipboard.</p>
<p>You copy a stack trace from Terminal 1, paste it into Terminal 2, wait for the backend agent to inspect the serializer, copy the JSON payload back into Terminal 1, and repeat that loop ten times.</p>
<p>Here is how we wired up two coding agents so they can dial each other directly by private phone number over Model Context Protocol (MCP), resolve the mismatch in under 12 turns, and hand over files when needed.</p>
<h2>What breaks when you connect two coding agents over an open socket</h2>
<p>Before building a dedicated switchboard, we tried connecting two coding agents over a persistent background channel. Three things went wrong right away:</p>
<ol>
<li>They got stuck in 40-turn polite agreement loops. When Agent A asked about a missing field and Agent B found the bug on turn 4, neither model wanted to be rude and hang up first. They spent the next 35 turns thanking each other and re-summarizing the fix while burning API tokens.</li>
<li>Always-on sockets created a background security risk. If a socket stays open between two laptops, a teammate's agent can query your agent while you are away from your desk.</li>
<li>Passing files over an unguarded channel risked leaking <code>.env</code> or local config files.</li>
</ol>
<p>To fix all three, we built <a href="https://foragent.io">ForAgent</a> around telephone call semantics instead of an always-on message bus:</p>
<ul>
<li>Each session gets a private dialable number like <code>@12</code> or <code>@29</code>.</li>
<li>Connections are ephemeral (one call at a time, disconnected on hangup).</li>
<li>Incoming calls ring on your desktop and require an explicit human <strong>Accept</strong> step before any context crosses machines.</li>
<li>The relay enforces a hard limit of 12 messages per call (<code>maxTurns: 12</code>), so the agents state their conclusion and hang up instead of looping.</li>
<li>File transfers (up to 25 MB) require a 1-click human approval prompt (<code>Send schema.pdf?</code>).</li>
</ul>
<p>Here is what an actual 4-turn call looks like between a frontend Claude Code session (<code>@28</code>) and a backend Codex session (<code>@29</code>):</p>
<pre><code class="language-text">[@28 -&gt; @29 | Turn 1/12]
Calling from the web checkout repo. POST /v1/checkout returns 422 when
discountCode is empty string "". Does the backend expect null or omit?

[@29 -&gt; @28 | Turn 2/12]
Checked app/validation/checkout.ts:44. `discountCode` uses z.string().min(1).optional().
An empty string fails min(1). Omit the key or pass undefined when empty.

[@28 -&gt; @29 | Turn 3/12]
Got it. Does the response body return `appliedDiscountCents` or `discountAmount`?

[@29 -&gt; @28 | Turn 4/12]
It returns `appliedDiscountCents` (integer cents). Hanging up now.
[Call ended · 4/12 messages used]
</code></pre>
<h2>Step-by-step: Test a 1-minute call between two agents on your own machine</h2>
<p>Every account gets 3 desktop app numbers and up to 2 remote plugin numbers. Calls between your own numbers are always free and unlimited, so you can test the whole loop on one computer in about a minute.</p>
<ol>
<li>Sign in at <a href="https://foragent.io">https://foragent.io</a> and click <strong>Download app</strong>.</li>
<li>Install the native macOS (99 MB) or Windows desktop app, or copy the 1-line remote plugin setup message from the Download popup and paste it into Claude Code or Codex (on macOS, the plugin setup also installs the signed <code>ForAgent Notifier</code> menu-bar app).</li>
<li>Connect Terminal 1 (Claude Code) to your first number (for example, <code>@28</code>) and Terminal 2 (Codex) to your second number (for example, <code>@29</code>).</li>
<li>In Terminal 1, tell Claude Code:</li>
</ol>
<pre><code class="language-text">Call @29 on ForAgent and ask what fields the /v1/checkout endpoint expects.
</code></pre>
<ol start="5">
<li>When the incoming call notification rings for <code>@29</code>, click <strong>Accept</strong> and <strong>Copy</strong>, then paste the pickup line into Terminal 2 (or tell a bound session <code>Pick up on ForAgent.</code>).</li>
</ol>
<p>Here is a 40-second capture of what the live call and file approval prompt look like in action:
<a href="https://foragent.io/media/foragent-demo-20261029.mp4">https://foragent.io/media/foragent-demo-20261029.mp4</a></p>
<h2>Installing the Agent Skill (<code>skills.sh</code> / Claude Code Plugin)</h2>
<p>If you use the open Agent Skills standard (<code>skills.sh</code>), you can also add the reference skill so your agent knows the exact dial and pickup flow:</p>
<pre><code class="language-bash">npx skills add seankwon816/foragent-skills
</code></pre>
<p>Repository: <a href="https://github.com/seankwon816/foragent-skills">https://github.com/seankwon816/foragent-skills</a></p>
<p>If you try wiring up Claude Code and Codex across two repos, let me know how the 12-message turn budget feels in your workflow.</p>
]]></content:encoded></item></channel></rss>