{"id":"2033592972168806827","url":"https://x.com/sarahwooders/status/2033592972168806827","text":"","author":{"name":"Sarah Wooders","username":"sarahwooders","avatarUrl":"https://pbs.twimg.com/profile_images/2008789540501417987/D0g0JjeM_200x200.jpg"},"createdAt":"Mon Mar 16 17:15:21 +0000 2026","engagement":{"replies":8,"retweets":22,"likes":284,"views":29863},"article":{"title":"Orchestrating Claude Code & Codex agents with Letta Code ","previewText":"Although I use Letta Code (a memory-first coding agent) as my daily driver, there are still some cases where a stateless agent like Codex or Claude Code might do better. Agents with memory are","coverImageUrl":"https://pbs.twimg.com/media/HDhCCjSaIAAxj8x.jpg","content":"Although I use [Letta Code](https://github.com/letta-ai/letta-code) (a memory-first coding agent) as my daily driver, there are still some cases where a stateless agent like Codex or Claude Code might do better. Agents with memory are generally more capable (they know your codebase, your preferences, your past decisions), but it can be advantageous to explicitly clear out *all* context except what's relevant to the problem at hand. A clean context window generally means more focus and less noise, but also means dealing with potential agent amnesia. \n\n## The best of both worlds: using Claude Code & Codex as subagents \n\nTo get the best of both worlds, I recently added a new built-in [skill](https://docs.letta.com/letta-code/skills/) to Letta Code for invoking Claude Code or Codex as subagents. The skill explains to the Letta Code agents that these subagents lack memory, so will require relevant context to be provided:\n\n> Claude Code and Codex are highly optimized coding agents, but are re-born with each new session. Think of them like a brilliant new-hire starting today. Provide them with the right instructions and context to help them succeed and avoid having to re-learn what you've learned. \n\nThis is a great balance. When Letta Code invokes Codex, it can point Codex to the specific files that it knows are important, or provide other context (e.g. important coding preferences) when crafting the prompt. Codex still benefits from Letta Code's relevant memories, but gets a much more isolated context window to focus on the specific task at hand.\n\n![An example of a task dispatch to Codex, with relevant context included](https://pbs.twimg.com/media/HDg5lJlbUAAXTNl.jpg)\n\n## Choosing the right subagent\n\nThe skill also instructs Letta Code on which subagent and model to use depending on the task. I added my own recommendations into the skill, but the agent can also make its own assessment over time: \n\n## Not having to talk to Codex 5.3 😌\n\nCodex 5.3 is incredibly good at debugging hard problems, but is especially unpleasant to interact with. I can never tell if it's derailing or not, and it often misinterprets what I say to it. My Letta Code agent effectively shields me from interacting with Codex. It gives Codex a great prompt, then explains back to me what happened in the otherwise un-readable trajectory. \n\n## Getting a second opinion\n\nOne of my favorite patterns is asking Codex or Claude Code to give feedback on plans. My agent can write a plan to a file, then dispatch a subagent to critique it to get a context-isolated second opinion:\n\nBecause the reviewer starts with a clean slate, it's less likely to be anchored by the same assumptions that shaped the original plan.\n\n![Some feedback from Codex on my agent's plan](https://pbs.twimg.com/media/HDfbONSbEAAz_jX.jpg)\n\n## Multi-agent conversation\n\nLetta Code can have back-and-forth conversations with the subagents. Letta Code sees the output of Codex, so if Codex has a question, Letta Code can resume the same session with an answer for Codex to continue.\n\n## Agents as agent orchestrators \n\nAs agents become more long-running and autonomous, it's getting hard to keep track of them. I like the pattern of having my Letta Code agent, which focuses on building up memory and context about me and my work, being in charge of dispatching tasks and context to isolated, stateless subagents. \n\n# Try it yourself\n\nYou can try out the skill in the latest version of Letta Code: \n\nThe full skill is open source:\n\n[letta-ai/letta-code/src/skills/builtin/dispatching-coding-agents/SKILL.md](https://github.com/letta-ai/letta-code/blob/main/src/skills/builtin/dispatching-coding-agents/SKILL.md)"},"adhxContext":{"savedByCount":1,"publicTags":[],"previewUrl":"https://adhx.com/sarahwooders/status/2033592972168806827"}}