<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sam Lai</title>
    <description>The latest articles on DEV Community by Sam Lai (@samlai).</description>
    <link>https://dev.to/samlai</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3837883%2F30fc18b6-69b9-4cdc-b234-a28350dffcc7.jpg</url>
      <title>DEV Community: Sam Lai</title>
      <link>https://dev.to/samlai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/samlai"/>
    <language>en</language>
    <item>
      <title>How I Split Work Between Claude Code and Codex in Real Projects</title>
      <dc:creator>Sam Lai</dc:creator>
      <pubDate>Sun, 22 Mar 2026 05:33:49 +0000</pubDate>
      <link>https://dev.to/samlai/how-i-split-work-between-claude-code-and-codex-in-real-projects-536l</link>
      <guid>https://dev.to/samlai/how-i-split-work-between-claude-code-and-codex-in-real-projects-536l</guid>
      <description>&lt;p&gt;I usually have two terminals open: Claude Code on the left, Codex on the right.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0rdvba69a73kvjtcok0d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0rdvba69a73kvjtcok0d.png" alt=" " width="800" height="476"&gt;&lt;/a&gt;&lt;br&gt;
Not for benchmarking. Just for work.&lt;/p&gt;

&lt;p&gt;I'm a Java backend developer working on a supply chain system with 20+ Spring Boot microservices, a lot of business logic, and the usual amount of legacy debt. After using both tools side by side for a few weeks, I stopped thinking of them as competitors.&lt;/p&gt;

&lt;p&gt;They do different jobs.&lt;/p&gt;


&lt;h2&gt;
  
  
  My Split
&lt;/h2&gt;

&lt;p&gt;The short version:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Claude Code handles understanding. Codex handles execution.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When I'm debugging something messy or reviewing code that touches real business logic, I usually start with Claude Code. It's better at following context through multiple layers and explaining &lt;em&gt;why&lt;/em&gt; something is happening.&lt;/p&gt;

&lt;p&gt;When the task is more mechanical, parallelizable, or just high-volume, I hand it to Codex. Tests, docs, repetitive edits, cleanup work — that's where it fits well.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The exact model breakdown I use:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Everyday coding, new features&lt;/td&gt;
&lt;td&gt;Claude Code&lt;/td&gt;
&lt;td&gt;Sonnet 4.6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Complex bugs, hard problems&lt;/td&gt;
&lt;td&gt;Claude Code&lt;/td&gt;
&lt;td&gt;Opus 4.6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Routine coding tasks&lt;/td&gt;
&lt;td&gt;Codex&lt;/td&gt;
&lt;td&gt;gpt-5.3-codex&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Problem investigation, deep reasoning&lt;/td&gt;
&lt;td&gt;Codex&lt;/td&gt;
&lt;td&gt;gpt-5.4 (default)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;One thing worth noting: higher model version ≠ better for daily work. Opus and gpt-5.4 have noticeably longer reasoning times. For routine tasks, that wait breaks the flow. I only reach for the heavier models when I'm genuinely stuck.&lt;/p&gt;

&lt;p&gt;I didn't arrive at this from theory. A production issue forced the pattern on me.&lt;/p&gt;


&lt;h2&gt;
  
  
  The Bug That Made It Obvious
&lt;/h2&gt;

&lt;p&gt;We hit a production anomaly that had probably been wrong for years, but only surfaced once a new code path triggered it.&lt;/p&gt;

&lt;p&gt;Classic legacy-code problem: a boundary condition buried inside old business logic, the kind people quietly work around for years instead of fixing properly.&lt;/p&gt;

&lt;p&gt;I gave both tools the same inputs: the exception, the relevant service code, and the logs.&lt;/p&gt;

&lt;p&gt;Claude Code traced the call chain and explained why the implementation failed in that specific scenario.&lt;/p&gt;

&lt;p&gt;Codex also suggested a direction, but it was one layer off.&lt;/p&gt;

&lt;p&gt;So I used Claude Code to pin down the root cause, fixed it — and while that was wrapping up, Codex was already running tests across multiple modules.&lt;/p&gt;

&lt;p&gt;That was the moment the split became obvious: one tool was helping me understand the problem, the other was helping me move faster once the direction was clear.&lt;/p&gt;


&lt;h2&gt;
  
  
  The Mistake People Make When Using Both
&lt;/h2&gt;

&lt;p&gt;The most common mistake is treating both agents like they should share the same instructions file.&lt;/p&gt;

&lt;p&gt;In my setup, they don't.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;CLAUDE.md&lt;/code&gt; is for Claude Code&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;AGENTS.md&lt;/code&gt; is for Codex&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CHANGES.log&lt;/code&gt; is the handoff layer between them
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;project/
├── CLAUDE.md      ← Claude Code only
├── AGENTS.md      ← Codex only
└── CHANGES.log    ← shared task state
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The project context is mostly the same. The behavior rules are not. That separation matters more than I expected.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 Setup tip: VSCode + &lt;strong&gt;Quick AI&lt;/strong&gt; plugin — two terminal panels side by side, one for Claude Code, one for Codex, no window switching.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  &lt;code&gt;CHANGES.log&lt;/code&gt; Is the Useful Part
&lt;/h2&gt;

&lt;p&gt;This ended up being the piece that actually made the workflow usable.&lt;/p&gt;

&lt;p&gt;I often start with Claude Code. But during peak hours it sometimes slows down or drops mid-task. Switching to Codex is the obvious move — but without a handoff record, you lose time re-explaining everything.&lt;/p&gt;

&lt;p&gt;So I use &lt;code&gt;CHANGES.log&lt;/code&gt; as a task-state log, not a code-change log:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;[2026-03-18 14:23] [CLAUDE_CODE] BUG-02
Status: PARTIAL
Done: Located boundary condition bug in OrderService.java — oversell issue
      caused by missing distributed lock in concurrent deduction path
Files modified: order-service/src/main/java/com/xxx/OrderService.java
Remaining: Idempotency check in InventoryClient.deduct() not yet added
Next agent: Pick up InventoryClient.java directly — full context available here

[2026-03-18 15:01] [CODEX] BUG-02 (pickup)
Status: COMPLETE
Files modified: inventory-service/src/main/java/com/xxx/InventoryClient.java
Tests: PASS — OrderServiceTest 5 passed, InventoryClientTest 3 passed
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When I switch tools, I'm not starting over.&lt;/p&gt;




&lt;h2&gt;
  
  
  How I Split Tasks in Practice
&lt;/h2&gt;

&lt;p&gt;For a typical refactor, the pattern usually looks like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Claude Code&lt;/strong&gt;: trace the existing business logic, define the change boundary, handle the reasoning-heavy parts&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Codex&lt;/strong&gt;: generate tests, update docs, handle repetitive edits, or pick up follow-up work in parallel&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If both tools give different answers, I don't blindly trust either. I compare the reasoning and make the call myself. That comparison is often where the real understanding happens.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Legacy Code Changes
&lt;/h2&gt;

&lt;p&gt;On a legacy codebase, context discipline matters more than people think.&lt;/p&gt;

&lt;p&gt;If I throw in random files and vague instructions, both tools get generic fast.&lt;/p&gt;

&lt;p&gt;So I keep the input tight: the interface that matters, the key logs, the exception, and just enough surrounding code to make the problem legible.&lt;/p&gt;

&lt;p&gt;Less context, but better context.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Do Now
&lt;/h2&gt;

&lt;p&gt;The useful question was never "Which one is better?"&lt;/p&gt;

&lt;p&gt;The better question: what kind of work should each one own?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If the task is reasoning-heavy, start with Claude Code&lt;/li&gt;
&lt;li&gt;If the task is parallelizable or repetitive, give it to Codex&lt;/li&gt;
&lt;li&gt;If you might switch midway, write the state down first&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's where the productivity gain came from — not from picking one tool, but from giving each tool a clear job.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>productivity</category>
      <category>java</category>
    </item>
  </channel>
</rss>
