<?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: VibeiDE</title>
    <description>The latest articles on DEV Community by VibeiDE (@vibeidedev).</description>
    <link>https://dev.to/vibeidedev</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4227145%2F481670a6-e97a-4e13-985b-b090392910e9.png</url>
      <title>DEV Community: VibeiDE</title>
      <link>https://dev.to/vibeidedev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vibeidedev"/>
    <language>en</language>
    <item>
      <title>Claude Code queue: queue messages, tasks and background work</title>
      <dc:creator>VibeiDE</dc:creator>
      <pubDate>Thu, 05 Nov 2026 19:39:50 +0000</pubDate>
      <link>https://dev.to/vibeidedev/claude-code-queue-queue-messages-tasks-and-background-work-2i1p</link>
      <guid>https://dev.to/vibeidedev/claude-code-queue-queue-messages-tasks-and-background-work-2i1p</guid>
      <description>&lt;p&gt;Originally published on &lt;a href="https://vibeide.dev/blog/claude-code-queue/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;vibeide.dev&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Claude Code has a built-in queue: type a message and press Enter while Claude is working, and Claude Code queues it instead of interrupting the turn. Queued messages reach Claude as soon as the running tool calls finish, &lt;code&gt;Ctrl+Enter&lt;/code&gt; sends them right away, &lt;code&gt;Esc&lt;/code&gt; interrupts and sends them next, and &lt;code&gt;Up&lt;/code&gt; takes them back for editing. To queue whole tasks rather than messages, start background sessions with &lt;code&gt;claude --bg "&amp;lt;prompt&amp;gt;"&lt;/code&gt; and watch them in &lt;code&gt;claude agents&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That short answer covers most searches for a Claude Code queue. The rest of this guide explains when queued entries are actually delivered, how to send, cancel or edit them, how to queue complete tasks as background sessions or scripts, and where a per-session queue stops being enough. Everything below was checked against the official &lt;a href="https://code.claude.com/docs/en/interactive-mode" rel="noopener noreferrer"&gt;interactive mode reference&lt;/a&gt; and &lt;a href="https://code.claude.com/docs/en/agent-view" rel="noopener noreferrer"&gt;agent view documentation&lt;/a&gt; in October 2026. Keys and versions change, so treat those pages as the source of truth.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does the Claude Code message queue work?
&lt;/h2&gt;

&lt;p&gt;You keep typing while Claude works. Each message you send with Enter is queued, listed in the conversation, and shown in gray until Claude starts responding to it, so you can see which instructions Claude has not picked up yet.&lt;/p&gt;

&lt;p&gt;When a queued entry reaches Claude depends on what you queued (as of October 2026):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Messages.&lt;/strong&gt; If you queue a message while Claude is running tool calls, Claude Code passes it to Claude as soon as those tool calls finish, inside the same turn. If the turn ends with messages still queued, they go out on their own, in the order you typed them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Commands and &lt;code&gt;!&lt;/code&gt; shell commands.&lt;/strong&gt; Claude Code holds them until the turn ends, then runs them one at a time in the order you queued them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Setting commands.&lt;/strong&gt; &lt;code&gt;/model&lt;/code&gt;, &lt;code&gt;/effort&lt;/code&gt; and &lt;code&gt;/fast&lt;/code&gt; are not queued at all. They run as soon as you send them, and the docs explain for each one whether the change applies to the current turn or the next.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is why queueing works well for small course corrections ("also update the README", "use the existing helper instead") and less well for a new, unrelated task. A queued message joins the current conversation and its context, so a second task typed into the queue shares the same session, the same context window and the same files.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do I send, interrupt or edit what I queued?
&lt;/h2&gt;

&lt;p&gt;Three keys control the queue. You do not need any of them for normal use, because queued messages are delivered on their own, but they matter when you change your mind.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Key&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;Ctrl+Enter&lt;/code&gt; (or &lt;code&gt;Ctrl+X Ctrl+S&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Sends your queued messages now, with your draft queued behind them. Requires v2.1.275 or later&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Esc&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Interrupts the turn without submitting your draft. Claude keeps the work done so far, and Claude Code sends what you queued right away&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;Up&lt;/code&gt; from the first line&lt;/td&gt;
&lt;td&gt;Takes queued messages and commands back into the input box, one per line, so you can edit them and press Enter to queue them again as one entry, or clear the box to drop them&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two details are worth knowing. First, what &lt;code&gt;Ctrl+Enter&lt;/code&gt; does to the running turn depends on Claude's current work: shell commands, subagents and other work that can move to the background keep running in the background while Claude reads your messages in the same turn, while a turn that is only writing a response is interrupted and your messages go next. In terminals that do not report extended keys, &lt;code&gt;Ctrl+Enter&lt;/code&gt; arrives as plain Enter and only queues the draft, so use &lt;code&gt;Ctrl+X Ctrl+S&lt;/code&gt; there. Second, queued shell commands come back with &lt;code&gt;Up&lt;/code&gt; only when the input box is empty and nothing else is queued; otherwise they stay in the queue and run after the turn.&lt;/p&gt;

&lt;p&gt;If your terminal swallows these keys, our guide to the &lt;a href="https://vibeide.dev/blog/best-terminal-for-claude-code/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;best terminal for Claude Code&lt;/a&gt; covers which terminals pass them through, and &lt;a href="https://vibeide.dev/blog/claude-code-commands/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;Claude Code commands&lt;/a&gt; lists the other shortcuts.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do I queue whole tasks instead of messages?
&lt;/h2&gt;

&lt;p&gt;A message queue serializes instructions inside one conversation. When you have several separate tasks, start a separate session for each one. Claude Code can run them as background sessions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude --bg &lt;span class="s2"&gt;"investigate the flaky SettingsChangeDetector test"&lt;/span&gt;
claude --bg --name &lt;span class="s2"&gt;"readme-refresh"&lt;/span&gt; &lt;span class="s2"&gt;"update the README for the new config flags"&lt;/span&gt;
claude agents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;claude --bg&lt;/code&gt; (or &lt;code&gt;--background&lt;/code&gt;) takes the prompt as a positional argument and starts the session in the background. &lt;code&gt;claude agents&lt;/code&gt; opens agent view, one screen that shows what is running, what needs your input and what is done. Inside a session you already have open, &lt;code&gt;/bg&lt;/code&gt; moves it to the background, and pressing the left arrow on an empty prompt backgrounds it and opens agent view. Messages you had queued move with the session.&lt;/p&gt;

&lt;p&gt;Agent view is a research preview as of October 2026, so keys may change. Three limits from the docs shape how you use it: &lt;code&gt;--bg&lt;/code&gt; cannot be combined with &lt;code&gt;-p&lt;/code&gt;, a finished or waiting session that stays unattached for about an hour has its process stopped (the conversation stays on disk and resumes when you attach), and each session uses your subscription quota independently. Ten background sessions drain a plan allowance roughly ten times faster than one, which our guide to &lt;a href="https://vibeide.dev/blog/claude-code-usage-limits/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;Claude Code usage limits&lt;/a&gt; covers in detail.&lt;/p&gt;

&lt;h3&gt;
  
  
  A simple sequential queue with headless mode
&lt;/h3&gt;

&lt;p&gt;If you want tasks to run strictly one after another, for example overnight, a shell loop over &lt;a href="https://vibeide.dev/blog/claude-code-headless-mode/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;headless mode&lt;/a&gt; is enough. &lt;code&gt;claude -p&lt;/code&gt; runs one prompt non-interactively and exits with a non-zero code when the run fails:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="nv"&gt;IFS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;read&lt;/span&gt; -r task&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  claude -p &lt;span class="s2"&gt;"$task"&lt;/span&gt; --permission-mode acceptEdits &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"failed: $task"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; tasks.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each line becomes its own run with fresh context. Unattended runs cannot answer permission prompts, so decide up front which tools or permission mode the loop may use, as described in the &lt;a href="https://code.claude.com/docs/en/headless" rel="noopener noreferrer"&gt;headless documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which Claude Code queue fits which job?
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Option&lt;/th&gt;
&lt;th&gt;Unit of work&lt;/th&gt;
&lt;th&gt;Runs&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Message queue&lt;/td&gt;
&lt;td&gt;A message in the current session&lt;/td&gt;
&lt;td&gt;In order, inside the same conversation&lt;/td&gt;
&lt;td&gt;Corrections and follow-ups to the task in progress&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;claude --bg&lt;/code&gt; and agent view&lt;/td&gt;
&lt;td&gt;A whole session per task&lt;/td&gt;
&lt;td&gt;In parallel, each with its own context&lt;/td&gt;
&lt;td&gt;Several independent tasks in one repository&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;claude -p&lt;/code&gt; loop&lt;/td&gt;
&lt;td&gt;One headless run per line&lt;/td&gt;
&lt;td&gt;Strictly one after another&lt;/td&gt;
&lt;td&gt;Unattended batches with known permissions&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Where a per-session queue stops being enough
&lt;/h2&gt;

&lt;p&gt;The built-in options queue work inside one machine's Claude Code. They do not give each project its own queue, they do not mix providers, and parallel sessions in one checkout still edit the same files. Give each parallel task its own Git worktree (see &lt;a href="https://git-scm.com/docs/git-worktree" rel="noopener noreferrer"&gt;git worktree&lt;/a&gt; and our &lt;a href="https://vibeide.dev/blog/claude-code-worktree/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;Claude Code worktree guide&lt;/a&gt;), and keep track of which task is waiting for review, or &lt;a href="https://vibeide.dev/blog/run-multiple-claude-code-sessions/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;running several Claude Code sessions&lt;/a&gt; turns into a hunt through terminal tabs.&lt;/p&gt;

&lt;p&gt;VibeiDE is a desktop app that coordinates the Codex, Claude Code and OpenCode CLIs you already installed. Each project has its own task queue; waiting prompts can be edited or reordered, and a task starts when its provider has a free slot, with a parallel limit per provider that you set per project. The composer mode "New worktree per task" gives each task its own Git worktree and branch, finished tasks wait in Ready for review, and slots control how many processes run at once without raising a provider allowance. See &lt;a href="https://vibeide.dev/use-cases/ai-agent-task-queue/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;the AI agent task queue&lt;/a&gt; or &lt;a href="https://vibeide.dev/for/claude-code/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;VibeiDE for Claude Code&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Does a queued message interrupt Claude?
&lt;/h3&gt;

&lt;p&gt;No. Pressing Enter while Claude works queues the message. Only &lt;code&gt;Esc&lt;/code&gt;, &lt;code&gt;Ctrl+C&lt;/code&gt; or, in some cases, &lt;code&gt;Ctrl+Enter&lt;/code&gt; interrupt the running turn.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why does Claude read my queued message before the turn ends?
&lt;/h3&gt;

&lt;p&gt;If Claude is running tool calls, Claude Code hands over queued messages as soon as those tool calls finish, within the same turn, so Claude can adjust course without waiting.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I cancel a queued message?
&lt;/h3&gt;

&lt;p&gt;Press &lt;code&gt;Up&lt;/code&gt; from the first line of the input box. The queued text returns to the input box, where you can edit it or clear it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can Claude Code run queued tasks in parallel?
&lt;/h3&gt;

&lt;p&gt;The message queue is sequential. For parallel work, start separate background sessions with &lt;code&gt;claude --bg&lt;/code&gt; and use a separate worktree per task so they do not edit the same files.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Press Enter while Claude works to queue a message; it shows in gray until Claude reads it.&lt;/li&gt;
&lt;li&gt;Messages are delivered after the current tool calls finish; commands and &lt;code&gt;!&lt;/code&gt; shell commands wait for the end of the turn.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl+Enter&lt;/code&gt; sends the queue now, &lt;code&gt;Esc&lt;/code&gt; interrupts and sends it next, &lt;code&gt;Up&lt;/code&gt; takes it back to edit.&lt;/li&gt;
&lt;li&gt;Queue whole tasks with &lt;code&gt;claude --bg&lt;/code&gt; and watch them in &lt;code&gt;claude agents&lt;/code&gt;; each session uses your quota on its own.&lt;/li&gt;
&lt;li&gt;For strictly sequential batches, loop over &lt;code&gt;claude -p&lt;/code&gt;; for parallel tasks, use one worktree per task.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>claudecode</category>
      <category>ai</category>
      <category>productivity</category>
      <category>cli</category>
    </item>
    <item>
      <title>Run multiple Claude Code sessions without file conflicts</title>
      <dc:creator>VibeiDE</dc:creator>
      <pubDate>Thu, 05 Nov 2026 19:34:29 +0000</pubDate>
      <link>https://dev.to/vibeidedev/run-multiple-claude-code-sessions-without-file-conflicts-3ak</link>
      <guid>https://dev.to/vibeidedev/run-multiple-claude-code-sessions-without-file-conflicts-3ak</guid>
      <description>&lt;p&gt;Originally published on &lt;a href="https://vibeide.dev/blog/run-multiple-claude-code-sessions/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;vibeide.dev&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Running one Claude Code session is simple. Running three at once on the same repository is where most people get burned. One session edits a file while another is halfway through testing it. A third reformats a directory the first one depends on. Nothing crashes loudly. You just end up with a working tree full of changes from several tasks, and no clean way to tell which change belongs to which request.&lt;/p&gt;

&lt;p&gt;The fix is not to run fewer sessions. It is to give each session its own place to work. This guide shows how to run multiple Claude Code sessions on one project without file conflicts, using git worktrees, and how to split and merge the work so it stays reviewable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why parallel sessions collide
&lt;/h2&gt;

&lt;p&gt;Every Claude Code session works on the files in its current directory. If two sessions start in the same checkout, they share one working tree. That creates three kinds of trouble:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Overlapping edits.&lt;/strong&gt; Two sessions change the same file. The second write wins, and the first session's change is silently lost or half merged.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Moving ground.&lt;/strong&gt; A session runs tests while another one is editing code under them. The results no longer describe the code that will be committed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tangled diffs.&lt;/strong&gt; When both finish, &lt;code&gt;git diff&lt;/code&gt; shows one blob of changes. You cannot review or revert one task without the other.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Running sessions in separate terminals does not help, because the terminals still point at the same folder. The isolation has to happen at the file level.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 1: a git worktree per session
&lt;/h2&gt;

&lt;p&gt;A &lt;a href="https://git-scm.com/docs/git-worktree" rel="noopener noreferrer"&gt;git worktree&lt;/a&gt; is a second working directory attached to the same repository. Each worktree has its own checked-out branch and its own files, while sharing one &lt;code&gt;.git&lt;/code&gt; history. It is the cheapest way to get real isolation, because you do not clone the repository again.&lt;/p&gt;

&lt;p&gt;Create one worktree per task, each on a new branch:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git worktree add -b auth ../app-auth
git worktree add -b search ../app-search
git worktree add -b fix-123 ../app-fix
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then start one Claude Code session in each directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ../app-auth &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; claude
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each session now edits its own files. They cannot overwrite each other, and each task ends as its own branch with its own diff.&lt;/p&gt;

&lt;p&gt;A few rules that save time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;One branch per worktree.&lt;/strong&gt; Git refuses to check out the same branch in two worktrees, which is exactly what you want.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Install dependencies per worktree.&lt;/strong&gt; Each directory needs its own &lt;code&gt;node_modules&lt;/code&gt; or virtual environment. Budget a minute for this.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Watch shared ports.&lt;/strong&gt; Two dev servers on port 3000 will fight. Give each worktree its own port through an environment variable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clean up when done.&lt;/strong&gt; Run &lt;code&gt;git worktree remove ../app-auth&lt;/code&gt; after the branch is merged, and &lt;code&gt;git worktree prune&lt;/code&gt; for folders you deleted by hand.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Option 2: let Claude Code create the worktree
&lt;/h2&gt;

&lt;p&gt;Claude Code can create the worktree for you. As of September 2026, the &lt;a href="https://code.claude.com/docs/en/common-workflows" rel="noopener noreferrer"&gt;common workflows documentation&lt;/a&gt; shows this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude --worktree feature-auth
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run the same command with a different name in a second terminal to start another isolated session. The repository needs at least one commit first. The &lt;a href="https://code.claude.com/docs/en/worktrees" rel="noopener noreferrer"&gt;worktrees page&lt;/a&gt; covers cleanup and &lt;code&gt;.worktreeinclude&lt;/code&gt;, which copies untracked files such as local environment files into new worktrees. Our &lt;a href="https://vibeide.dev/blog/claude-code-worktree/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;Claude Code worktree guide&lt;/a&gt; walks through the flag, the base branch setting, exit cleanup and subagent isolation step by step.&lt;/p&gt;

&lt;p&gt;This is the fastest path when you start sessions by hand. The manual &lt;code&gt;git worktree&lt;/code&gt; commands give you more control over names, locations and the source branch. If you also run Codex, its desktop app has worktree chats built in, and as of November 2026 the Codex CLI reference lists a --worktree flag that starts a new interactive session, codex fork, codex exec or codex exec fork in a new Codex-managed worktree (local execution only).&lt;/p&gt;

&lt;p&gt;The same question comes up inside a single session. &lt;a href="https://vibeide.dev/blog/claude-code-subagents/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;Claude Code subagents&lt;/a&gt; start in the main session's working directory, so by default they read and edit the same files as you. As of October 2026, the &lt;a href="https://code.claude.com/docs/en/sub-agents" rel="noopener noreferrer"&gt;subagents documentation&lt;/a&gt; lets a custom subagent set &lt;code&gt;isolation: worktree&lt;/code&gt; in its frontmatter to run in a temporary worktree instead, which is worth doing for any subagent that edits code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 3: separate clones
&lt;/h2&gt;

&lt;p&gt;A full second clone also isolates files. It costs more disk space and every clone fetches separately, but it can be simpler when projects use tools that do not handle worktrees well. For most repositories, worktrees are the better default.&lt;/p&gt;

&lt;h2&gt;
  
  
  Split the work so it can run in parallel
&lt;/h2&gt;

&lt;p&gt;Isolation stops file collisions. It does not stop merge conflicts later. Two sessions editing the same function in different worktrees will still conflict when you merge. So split the tasks with the merge in mind:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Split by area, not by step.&lt;/strong&gt; "Add search to the invoices page" and "fix the login redirect" run well in parallel. "Write the model" and "write the API for that model" do not, because the second depends on the first.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep shared files out of parallel tasks.&lt;/strong&gt; Lockfiles, route tables and global config attract conflicts. Give those changes to one task, or do them first.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write the definition of done into each request.&lt;/strong&gt; State which files a session may change and which check proves it finished. A session that knows its scope rarely wanders into another task's files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep sessions short.&lt;/strong&gt; One request per session gives you one diff to review. Long sessions that collect several requests are hard to split later.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Queue follow-ups instead of opening another session in the same folder.&lt;/strong&gt; If a session is still busy and the next request touches the same files, line it up behind the current one. Our &lt;a href="https://vibeide.dev/blog/claude-code-queue/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;Claude Code queue guide&lt;/a&gt; covers the built-in message queue and background sessions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Merge back one reviewed branch at a time
&lt;/h2&gt;

&lt;p&gt;Parallel sessions finish at different times. Merge them one by one:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;When a session finishes, review its diff in that worktree.&lt;/li&gt;
&lt;li&gt;Run the tests there, not in your main checkout.&lt;/li&gt;
&lt;li&gt;Merge or open a pull request for that branch.&lt;/li&gt;
&lt;li&gt;Rebase the remaining branches on the updated main before they finish, so conflicts show up early and small.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Do not merge a branch just because the session stopped. A finished session is an unreviewed change. For a practical review routine, see our guide on &lt;a href="https://vibeide.dev/blog/review-ai-generated-code/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;how to review AI generated code&lt;/a&gt;, and for the full loop around each session, from plan mode to a check Claude can run, see our &lt;a href="https://vibeide.dev/blog/claude-code-workflow/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;Claude Code workflow&lt;/a&gt; guide.&lt;/p&gt;

&lt;h2&gt;
  
  
  How many sessions is too many?
&lt;/h2&gt;

&lt;p&gt;The limit is usually not your machine. It is your review capacity and your usage allowance.&lt;/p&gt;

&lt;p&gt;Every session draws from the same Claude plan. As of September 2026, the &lt;a href="https://claude.com/pricing" rel="noopener noreferrer"&gt;Claude pricing page&lt;/a&gt; says every plan has usage limits that reset on a rolling five-hour window, and paid plans add weekly limits. Five parallel sessions spend that allowance about five times faster than one. They do not give you more of it.&lt;/p&gt;

&lt;p&gt;Review is the other ceiling. If three sessions finish every twenty minutes and each diff takes ten minutes to review, you are already the bottleneck. Start with two or three sessions, and add more only when your review queue stays short. Our page on &lt;a href="https://vibeide.dev/rate-limits/claude-code/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;Claude Code rate limits&lt;/a&gt; covers how to plan work around the windows, and &lt;a href="https://vibeide.dev/blog/codex-vs-claude-code/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;Codex vs Claude Code&lt;/a&gt; covers splitting work across two providers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where VibeiDE fits
&lt;/h2&gt;

&lt;p&gt;VibeiDE is a desktop app that coordinates the Codex, Claude Code and OpenCode CLIs you already installed, with your own provider accounts. Each project has its own task queue, and each project sets its own parallel limit per provider, so a task starts only when a slot is free. Slots control how many processes run at once; they do not raise your provider allowance, and they do not isolate files on their own. For that, the composer's "New worktree per task" mode gives each task its own git worktree and branch from a chosen source, so tasks run side by side. See &lt;a href="https://vibeide.dev/use-cases/parallel-ai-coding-agents/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;running AI coding agents in parallel&lt;/a&gt; and the &lt;a href="https://vibeide.dev/for/claude-code/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;Claude Code page&lt;/a&gt; for details.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;One session, one worktree, one branch.&lt;/li&gt;
&lt;li&gt;Install dependencies and set a unique port in each worktree.&lt;/li&gt;
&lt;li&gt;Split tasks by area, and keep shared files in a single task.&lt;/li&gt;
&lt;li&gt;Give subagents that edit code &lt;code&gt;isolation: worktree&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Put the allowed files and a verification step in every request.&lt;/li&gt;
&lt;li&gt;Review and merge one branch at a time, and rebase the rest early.&lt;/li&gt;
&lt;li&gt;Scale the number of sessions to your review speed and your usage window, not to your CPU.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>claudecode</category>
      <category>git</category>
      <category>ai</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Codex MCP: add, configure and debug MCP servers in Codex CLI</title>
      <dc:creator>VibeiDE</dc:creator>
      <pubDate>Thu, 05 Nov 2026 19:29:00 +0000</pubDate>
      <link>https://dev.to/vibeidedev/codex-mcp-add-configure-and-debug-mcp-servers-in-codex-cli-1j1p</link>
      <guid>https://dev.to/vibeidedev/codex-mcp-add-configure-and-debug-mcp-servers-in-codex-cli-1j1p</guid>
      <description>&lt;p&gt;Originally published on &lt;a href="https://vibeide.dev/blog/codex-mcp/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;vibeide.dev&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Codex can call tools from Model Context Protocol (MCP) servers: documentation lookups, browsers, design files, issue trackers and more. You add a server once, and the Codex CLI, the Codex app and the IDE extension all pick it up because they share one configuration. This guide shows the exact &lt;code&gt;codex mcp&lt;/code&gt; commands and &lt;code&gt;config.toml&lt;/code&gt; keys from the official &lt;a href="https://learn.chatgpt.com/docs/extend/mcp?surface=cli" rel="noopener noreferrer"&gt;Codex MCP documentation&lt;/a&gt; and the open source &lt;a href="https://github.com/openai/codex" rel="noopener noreferrer"&gt;Codex CLI&lt;/a&gt;, checked in November 2026.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quick answer:&lt;/strong&gt; run &lt;code&gt;codex mcp add &amp;lt;name&amp;gt; -- &amp;lt;command&amp;gt;&lt;/code&gt; for a local (stdio) server or &lt;code&gt;codex mcp add &amp;lt;name&amp;gt; --url &amp;lt;url&amp;gt;&lt;/code&gt; for a remote (Streamable HTTP) server, then start Codex and type &lt;code&gt;/mcp&lt;/code&gt; to see the connected servers. Every server is stored as an &lt;code&gt;[mcp_servers.&amp;lt;name&amp;gt;]&lt;/code&gt; table in &lt;code&gt;~/.codex/config.toml&lt;/code&gt;, or in &lt;code&gt;.codex/config.toml&lt;/code&gt; for one trusted project.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is MCP in Codex?
&lt;/h2&gt;

&lt;p&gt;MCP is an open protocol that lets Codex use tools and context from outside programs. Codex supports two kinds of servers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Stdio servers&lt;/strong&gt; are local programs that Codex starts itself, from a &lt;code&gt;command&lt;/code&gt; and its &lt;code&gt;args&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Streamable HTTP servers&lt;/strong&gt; run somewhere else, and Codex reaches them at a &lt;code&gt;url&lt;/code&gt;, optionally with a bearer token or OAuth.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both kinds end up in the same list, and Codex can call their tools while it works on your task.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do I add an MCP server to Codex?
&lt;/h2&gt;

&lt;p&gt;Use &lt;code&gt;codex mcp add&lt;/code&gt;. The usage line in the Codex source is &lt;code&gt;codex mcp add [OPTIONS] &amp;lt;NAME&amp;gt; (--url &amp;lt;URL&amp;gt; | -- &amp;lt;COMMAND&amp;gt;...)&lt;/code&gt;: give the server a name, then either a command after &lt;code&gt;--&lt;/code&gt; or a URL, never both.&lt;/p&gt;

&lt;p&gt;A local stdio server, here the Context7 documentation server used as the example in the Codex docs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;codex mcp add context7 -- npx -y @upstash/context7-mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pass environment variables to a stdio server with &lt;code&gt;--env KEY=VALUE&lt;/code&gt;. You can repeat the flag, and it only works for stdio servers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;codex mcp add my-db --env &lt;span class="nv"&gt;DATABASE_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;postgres://localhost/dev -- npx -y my-db-mcp-server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A remote Streamable HTTP server, with the token read from an environment variable instead of stored in the file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;codex mcp add figma --url https://mcp.figma.com/mcp --bearer-token-env-var FIGMA_OAUTH_TOKEN
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then start Codex in your project and type &lt;code&gt;/mcp&lt;/code&gt; to check that the server connected and see what it offers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Codex MCP commands
&lt;/h2&gt;

&lt;p&gt;These are the &lt;code&gt;codex mcp&lt;/code&gt; subcommands as defined in the Codex CLI source in November 2026:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;codex mcp add &amp;lt;name&amp;gt; -- &amp;lt;command&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Adds a stdio server (&lt;code&gt;--env KEY=VALUE&lt;/code&gt; sets its environment)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;codex mcp add &amp;lt;name&amp;gt; --url &amp;lt;url&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Adds a Streamable HTTP server (&lt;code&gt;--bearer-token-env-var&lt;/code&gt;, OAuth flags)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;codex mcp list&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Lists configured servers (&lt;code&gt;--json&lt;/code&gt; for JSON output)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;codex mcp get &amp;lt;name&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Shows one server's configuration (&lt;code&gt;--json&lt;/code&gt; available)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;codex mcp remove &amp;lt;name&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Removes a server configuration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;codex mcp login &amp;lt;name&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Signs in to a server with OAuth (&lt;code&gt;--scopes&lt;/code&gt;, &lt;code&gt;--no-browser&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;codex mcp logout &amp;lt;name&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Removes the stored OAuth credentials for a server&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;/mcp&lt;/code&gt; (inside Codex)&lt;/td&gt;
&lt;td&gt;Shows the connected servers in the current session&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;codex mcp list --json&lt;/code&gt; is handy in scripts, for example to check in CI that a required server is configured before you run &lt;code&gt;codex exec&lt;/code&gt;. Our &lt;a href="https://vibeide.dev/blog/codex-exec/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;codex exec guide&lt;/a&gt; covers non-interactive runs.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do I configure MCP servers in config.toml?
&lt;/h2&gt;

&lt;p&gt;Every server lives in a &lt;code&gt;[mcp_servers.&amp;lt;server-name&amp;gt;]&lt;/code&gt; table. You can edit the file directly instead of using &lt;code&gt;codex mcp add&lt;/code&gt;. The stdio example from the docs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="k"&gt;[mcp_servers.context7]&lt;/span&gt;
&lt;span class="na"&gt;command&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"npx"&lt;/span&gt;
&lt;span class="na"&gt;args&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"@upstash/context7-mcp"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="na"&gt;env_vars&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"LOCAL_TOKEN"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;[mcp_servers.context7.env]&lt;/span&gt;
&lt;span class="na"&gt;MY_ENV_VAR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"MY_ENV_VALUE"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;env&lt;/code&gt; sets variables for the server process, and &lt;code&gt;env_vars&lt;/code&gt; forwards variables that already exist in your shell by name. The Streamable HTTP example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="k"&gt;[mcp_servers.figma]&lt;/span&gt;
&lt;span class="na"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"https://mcp.figma.com/mcp"&lt;/span&gt;
&lt;span class="na"&gt;bearer_token_env_var&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"FIGMA_OAUTH_TOKEN"&lt;/span&gt;
&lt;span class="na"&gt;http_headers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"X-Figma-Region"&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"us-east-1"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The keys you will use most, as listed in the docs in November 2026:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Key&lt;/th&gt;
&lt;th&gt;Applies to&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;command&lt;/code&gt;, &lt;code&gt;args&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;stdio&lt;/td&gt;
&lt;td&gt;Program and arguments that start the server&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;env&lt;/code&gt;, &lt;code&gt;env_vars&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;stdio&lt;/td&gt;
&lt;td&gt;Set variables, or forward existing ones by name&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;cwd&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;stdio&lt;/td&gt;
&lt;td&gt;Working directory for the server&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;url&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;HTTP&lt;/td&gt;
&lt;td&gt;Address of the Streamable HTTP server&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;bearer_token_env_var&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;HTTP&lt;/td&gt;
&lt;td&gt;Environment variable holding the bearer token&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;http_headers&lt;/code&gt;, &lt;code&gt;env_http_headers&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;HTTP&lt;/td&gt;
&lt;td&gt;Static headers, or headers read from variables&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;startup_timeout_sec&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;both&lt;/td&gt;
&lt;td&gt;Seconds allowed for startup (default 10)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;tool_timeout_sec&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;both&lt;/td&gt;
&lt;td&gt;Seconds allowed for one tool call (default 60)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;enabled&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;both&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;false&lt;/code&gt; turns a server off without deleting it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;required&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;both&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;true&lt;/code&gt; makes startup fail if the server cannot start&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;enabled_tools&lt;/code&gt;, &lt;code&gt;disabled_tools&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;both&lt;/td&gt;
&lt;td&gt;Allow list and deny list for the server's tools&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Keep secrets out of the file where you can. &lt;code&gt;bearer_token_env_var&lt;/code&gt;, &lt;code&gt;env_vars&lt;/code&gt; and &lt;code&gt;env_http_headers&lt;/code&gt; all read values from your environment, so the config can be committed without the token.&lt;/p&gt;

&lt;h2&gt;
  
  
  Global or project config?
&lt;/h2&gt;

&lt;p&gt;Codex reads MCP servers from two places. &lt;code&gt;~/.codex/config.toml&lt;/code&gt; is the default and applies to every project. A &lt;code&gt;.codex/config.toml&lt;/code&gt; file inside a repository adds servers for that project only, and the docs state that it works only in trusted projects.&lt;/p&gt;

&lt;p&gt;A good split: personal tools such as a documentation server go in the global file, and tools the whole team needs for one repository (a browser for end-to-end tests, the project's issue tracker) go in the project file, committed next to your &lt;code&gt;AGENTS.md&lt;/code&gt;. Our guide to &lt;a href="https://vibeide.dev/blog/agents-md-codex/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;AGENTS.md for Codex&lt;/a&gt; covers the instruction side of the same setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do I log in to an MCP server with OAuth?
&lt;/h2&gt;

&lt;p&gt;Many remote servers use OAuth instead of a static token. Run &lt;code&gt;codex mcp login &amp;lt;server-name&amp;gt;&lt;/code&gt; and finish the sign-in in your browser. On a machine without a browser, &lt;code&gt;--no-browser&lt;/code&gt; prints the authorization URL and lets you paste the callback URL back. &lt;code&gt;--scopes read,write&lt;/code&gt; overrides the scopes for one login.&lt;/p&gt;

&lt;p&gt;If the server needs a pre-registered OAuth client, add it with the client id:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;codex mcp add example --url https://mcp.example.com --oauth-client-id my-client
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The docs say the default callback is &lt;code&gt;http://127.0.0.1/callback&lt;/code&gt;, and that the top-level &lt;code&gt;mcp_oauth_callback_port&lt;/code&gt; and &lt;code&gt;mcp_oauth_callback_url&lt;/code&gt; settings fix the port or URL when a server only accepts a specific redirect. &lt;code&gt;codex mcp logout &amp;lt;server-name&amp;gt;&lt;/code&gt; removes the stored credentials.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do I limit which MCP tools Codex can use?
&lt;/h2&gt;

&lt;p&gt;A server can expose far more tools than you want an agent to call. Two keys narrow the list: &lt;code&gt;enabled_tools&lt;/code&gt; is an allow list, and &lt;code&gt;disabled_tools&lt;/code&gt; is a deny list that the docs say is applied after &lt;code&gt;enabled_tools&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="k"&gt;[mcp_servers.tracker]&lt;/span&gt;
&lt;span class="na"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"https://mcp.example.com/mcp"&lt;/span&gt;
&lt;span class="na"&gt;enabled_tools&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"read_file"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"search"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"delete_issue"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="na"&gt;disabled_tools&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"delete_issue"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For approvals, the docs list &lt;code&gt;default_tools_approval_mode&lt;/code&gt; per server (values &lt;code&gt;auto&lt;/code&gt;, &lt;code&gt;prompt&lt;/code&gt;, &lt;code&gt;writes&lt;/code&gt; or &lt;code&gt;approve&lt;/code&gt;) and a per-tool override under &lt;code&gt;tools.&amp;lt;tool&amp;gt;.approval_mode&lt;/code&gt;. &lt;code&gt;tools.&amp;lt;tool&amp;gt;.output_token_limit&lt;/code&gt; caps how much one tool's output can add to the context. MCP tools sit next to Codex's own sandbox and approval settings, which our &lt;a href="https://vibeide.dev/blog/codex-sandbox/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;Codex sandbox guide&lt;/a&gt; explains.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fix common Codex MCP problems
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Symptom&lt;/th&gt;
&lt;th&gt;What to try&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Server missing from &lt;code&gt;/mcp&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Run &lt;code&gt;codex mcp list&lt;/code&gt; and check the name; a project server needs a trusted project&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Server times out at startup&lt;/td&gt;
&lt;td&gt;Raise &lt;code&gt;startup_timeout_sec&lt;/code&gt;; the first &lt;code&gt;npx&lt;/code&gt; run may be downloading the package&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Slow tool calls fail&lt;/td&gt;
&lt;td&gt;Raise &lt;code&gt;tool_timeout_sec&lt;/code&gt; for that server&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Codex refuses to start&lt;/td&gt;
&lt;td&gt;A server marked &lt;code&gt;required = true&lt;/code&gt; failed; fix it or set &lt;code&gt;required = false&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;401 from an HTTP server&lt;/td&gt;
&lt;td&gt;Check that the variable in &lt;code&gt;bearer_token_env_var&lt;/code&gt; is set in the shell that starts Codex, or run &lt;code&gt;codex mcp login&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You want it off for a while&lt;/td&gt;
&lt;td&gt;Set &lt;code&gt;enabled = false&lt;/code&gt; instead of deleting the table&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A useful first check for any stdio server is to run its &lt;code&gt;command&lt;/code&gt; and &lt;code&gt;args&lt;/code&gt; by hand in the same shell. If it fails there, it will fail inside Codex too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Can Codex run as an MCP server?
&lt;/h2&gt;

&lt;p&gt;Older guides show Codex started as an MCP server so another agent can call it, with tools named &lt;code&gt;codex&lt;/code&gt; and &lt;code&gt;codex-reply&lt;/code&gt;. OpenAI's own cookbook now marks that Codex MCP server as deprecated and kept for existing integrations, so for new automation look at &lt;code&gt;codex exec&lt;/code&gt; or the Codex SDK instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  One MCP setup, several agents
&lt;/h2&gt;

&lt;p&gt;If you also use Claude Code, you will configure many of the same servers there. Our &lt;a href="https://vibeide.dev/blog/claude-code-mcp/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;Claude Code MCP guide&lt;/a&gt; covers its &lt;code&gt;claude mcp add&lt;/code&gt; commands and scopes, and &lt;a href="https://vibeide.dev/blog/codex-vs-claude-code/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;Codex vs Claude Code&lt;/a&gt; compares the two CLIs. VibeiDE is a desktop app that coordinates the Codex, Claude Code and OpenCode CLIs you already installed, so each CLI keeps its own MCP configuration; Codex runs in an embedded terminal with its original interface. Each project has its own task queue, and finished tasks wait in Ready for review. See the &lt;a href="https://vibeide.dev/for/codex/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;Codex page&lt;/a&gt; or start a 14-day trial, without a card, from the &lt;a href="https://vibeide.dev/releases/desktop/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;download page&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How do I add an MCP server to Codex CLI?
&lt;/h3&gt;

&lt;p&gt;Run &lt;code&gt;codex mcp add &amp;lt;name&amp;gt; -- &amp;lt;command&amp;gt;&lt;/code&gt; for a local server or &lt;code&gt;codex mcp add &amp;lt;name&amp;gt; --url &amp;lt;url&amp;gt;&lt;/code&gt; for a remote one. Then type &lt;code&gt;/mcp&lt;/code&gt; inside Codex to confirm it connected.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where is the Codex MCP config file?
&lt;/h3&gt;

&lt;p&gt;In &lt;code&gt;~/.codex/config.toml&lt;/code&gt;, under &lt;code&gt;[mcp_servers.&amp;lt;name&amp;gt;]&lt;/code&gt; tables. A project can add servers in &lt;code&gt;.codex/config.toml&lt;/code&gt;, which Codex reads only for trusted projects.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does Codex support remote MCP servers?
&lt;/h3&gt;

&lt;p&gt;Yes. Codex supports Streamable HTTP servers through the &lt;code&gt;url&lt;/code&gt; key, with a bearer token from &lt;code&gt;bearer_token_env_var&lt;/code&gt;, custom headers or OAuth via &lt;code&gt;codex mcp login&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I disable an MCP server in Codex without deleting it?
&lt;/h3&gt;

&lt;p&gt;Set &lt;code&gt;enabled = false&lt;/code&gt; in that server's table. To hide only some tools, use &lt;code&gt;enabled_tools&lt;/code&gt; or &lt;code&gt;disabled_tools&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do the Codex app and IDE extension use the same MCP servers?
&lt;/h3&gt;

&lt;p&gt;Yes. The docs state that the desktop app, the CLI and the IDE extension share the same configuration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Add servers with &lt;code&gt;codex mcp add&lt;/code&gt;: a command after &lt;code&gt;--&lt;/code&gt; for stdio, &lt;code&gt;--url&lt;/code&gt; for Streamable HTTP.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;codex mcp list&lt;/code&gt;, &lt;code&gt;get&lt;/code&gt;, &lt;code&gt;remove&lt;/code&gt;, &lt;code&gt;login&lt;/code&gt; and &lt;code&gt;logout&lt;/code&gt; manage them; &lt;code&gt;/mcp&lt;/code&gt; shows what is connected.&lt;/li&gt;
&lt;li&gt;Servers live in &lt;code&gt;[mcp_servers.&amp;lt;name&amp;gt;]&lt;/code&gt; tables in &lt;code&gt;~/.codex/config.toml&lt;/code&gt; or a trusted project's &lt;code&gt;.codex/config.toml&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Read tokens from environment variables with &lt;code&gt;bearer_token_env_var&lt;/code&gt;, &lt;code&gt;env_vars&lt;/code&gt; and &lt;code&gt;env_http_headers&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Narrow tools with &lt;code&gt;enabled_tools&lt;/code&gt;, then &lt;code&gt;disabled_tools&lt;/code&gt;; set approvals per server or per tool.&lt;/li&gt;
&lt;li&gt;Raise &lt;code&gt;startup_timeout_sec&lt;/code&gt; or &lt;code&gt;tool_timeout_sec&lt;/code&gt; for slow servers, and use &lt;code&gt;enabled = false&lt;/code&gt; to pause one.&lt;/li&gt;
&lt;li&gt;Install Codex first with our &lt;a href="https://vibeide.dev/blog/install-codex-cli/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;Codex CLI install guide&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>codex</category>
      <category>ai</category>
      <category>mcp</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Codex exec: execute Codex non-interactively in scripts and CI</title>
      <dc:creator>VibeiDE</dc:creator>
      <pubDate>Wed, 04 Nov 2026 21:14:35 +0000</pubDate>
      <link>https://dev.to/vibeidedev/codex-exec-execute-codex-non-interactively-in-scripts-and-ci-4g50</link>
      <guid>https://dev.to/vibeidedev/codex-exec-execute-codex-non-interactively-in-scripts-and-ci-4g50</guid>
      <description>&lt;p&gt;Originally published on &lt;a href="https://vibeide.dev/blog/codex-exec/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;vibeide.dev&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most people meet Codex in its interactive terminal UI. The same agent also runs without that UI: &lt;code&gt;codex exec&lt;/code&gt; takes a prompt, works through the task, prints the final answer and exits. That makes it the piece you use in shell scripts, git hooks, cron jobs and CI pipelines, anywhere nobody is sitting at the keyboard.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quick answer:&lt;/strong&gt; run &lt;code&gt;codex exec "your task"&lt;/code&gt; inside a Git repository. It is read-only by default, so add &lt;code&gt;--sandbox workspace-write&lt;/code&gt; when the task must edit files, and &lt;code&gt;-o result.md&lt;/code&gt; to save only the final answer.&lt;/p&gt;

&lt;p&gt;This guide covers what &lt;code&gt;codex exec&lt;/code&gt; does by default, how to give it more or less permission, how to get output a script can parse, how to continue a run with &lt;code&gt;codex exec resume&lt;/code&gt;, and how to run it safely in CI. Commands and flags follow the official &lt;a href="https://learn.chatgpt.com/docs/non-interactive-mode" rel="noopener noreferrer"&gt;non-interactive mode documentation&lt;/a&gt; and the &lt;a href="https://github.com/openai/codex" rel="noopener noreferrer"&gt;Codex source code&lt;/a&gt; as of October 2026. If Codex is not installed yet, start with our guide to &lt;a href="https://vibeide.dev/blog/install-codex-cli/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;installing the Codex CLI&lt;/a&gt;. Claude Code has the same idea in &lt;code&gt;claude -p&lt;/code&gt;, covered in our guide to &lt;a href="https://vibeide.dev/blog/claude-code-headless-mode/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;Claude Code headless mode&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What codex exec does
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;codex exec&lt;/code&gt; (alias &lt;code&gt;codex e&lt;/code&gt;) runs one task non-interactively. You pass the instructions as an argument, Codex reads the repository, runs commands inside its sandbox and stops when the task is done.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;codex &lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="s2"&gt;"summarize the repository structure and list the top 5 risky areas"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two details make it script friendly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Progress goes to stderr, the answer goes to stdout.&lt;/strong&gt; While Codex works, its steps stream to stderr. Only the final agent message is printed to stdout, so you can pipe or redirect it without filtering anything out.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It expects a Git repository.&lt;/strong&gt; Codex refuses to run outside one, as a guard against destructive changes in folders you cannot roll back. Add &lt;code&gt;--skip-git-repo-check&lt;/code&gt; when you deliberately run it elsewhere, such as a scratch directory.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because stdout carries only the answer, saving a result is a plain redirect:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;codex &lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="s2"&gt;"generate release notes for the last 10 commits"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; tee release-notes.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Feed it input from stdin
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;codex exec&lt;/code&gt; reads standard input in two ways. If you pass a prompt and pipe data in, the piped text becomes context for that prompt:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git diff main...HEAD &lt;span class="o"&gt;|&lt;/span&gt; codex &lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="s2"&gt;"explain what this diff changes, file by file"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; diff-notes.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you pass &lt;code&gt;-&lt;/code&gt; as the prompt, or no prompt at all, stdin becomes the whole prompt. That is useful when a script builds the instructions from a template:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cat prompts/triage.md &lt;span class="o"&gt;|&lt;/span&gt; codex &lt;span class="nb"&gt;exec&lt;/span&gt; -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;resume&lt;/code&gt; and &lt;code&gt;review&lt;/code&gt; subcommands described below accept &lt;code&gt;-&lt;/code&gt; the same way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Permissions: read-only unless you say otherwise
&lt;/h2&gt;

&lt;p&gt;The most important default to know: &lt;strong&gt;&lt;code&gt;codex exec&lt;/code&gt; runs in a read-only sandbox.&lt;/strong&gt; Codex can read files and run commands that only look around, but it cannot change your working tree. That is safe for summaries, reviews and questions, and it is why a first attempt at "fix the failing test" often reports a fix without applying it.&lt;/p&gt;

&lt;p&gt;Raise the level per run with &lt;code&gt;--sandbox&lt;/code&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Sandbox&lt;/th&gt;
&lt;th&gt;What Codex may do&lt;/th&gt;
&lt;th&gt;Typical use&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;read-only&lt;/code&gt; (default)&lt;/td&gt;
&lt;td&gt;Read files, no writes&lt;/td&gt;
&lt;td&gt;Summaries, reviews, questions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;workspace-write&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Edit files inside the project&lt;/td&gt;
&lt;td&gt;Fixes, refactors, generated code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;danger-full-access&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No sandbox at all&lt;/td&gt;
&lt;td&gt;Disposable containers only&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;codex &lt;span class="nb"&gt;exec&lt;/span&gt; --sandbox workspace-write &lt;span class="s2"&gt;"fix the failing test in tests/api.test.ts"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Older scripts often use &lt;code&gt;--full-auto&lt;/code&gt;. The documentation calls it a deprecated compatibility flag that prints a warning, so write &lt;code&gt;--sandbox workspace-write&lt;/code&gt; in new scripts. The flag &lt;code&gt;--dangerously-bypass-approvals-and-sandbox&lt;/code&gt; (alias &lt;code&gt;--yolo&lt;/code&gt;) removes every protection; keep it for throwaway environments that you would happily delete. Our &lt;a href="https://vibeide.dev/blog/codex-sandbox/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;guide to the Codex sandbox&lt;/a&gt; explains the modes, network access, extra writable folders and approval policies in more detail.&lt;/p&gt;

&lt;p&gt;Two more flags help when you want a predictable run regardless of whose machine it is: &lt;code&gt;--ignore-user-config&lt;/code&gt; skips your personal &lt;code&gt;config.toml&lt;/code&gt; (authentication still works), and &lt;code&gt;--ignore-rules&lt;/code&gt; skips user and project execpolicy rule files.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get output a script can use
&lt;/h2&gt;

&lt;p&gt;Plain text on stdout is enough for notes and summaries. When another program has to act on the result, &lt;code&gt;codex exec&lt;/code&gt; has three better options.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Write the final message to a file&lt;/strong&gt; with &lt;code&gt;-o&lt;/code&gt; (long form &lt;code&gt;--output-last-message&lt;/code&gt;). The terminal still shows progress, and the file gets only the answer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;codex &lt;span class="nb"&gt;exec&lt;/span&gt; -o summary.md &lt;span class="s2"&gt;"summarize the changes on this branch for a pull request description"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Stream events as JSON Lines&lt;/strong&gt; with &lt;code&gt;--json&lt;/code&gt;. Every step becomes one JSON object on stdout: &lt;code&gt;thread.started&lt;/code&gt;, &lt;code&gt;turn.started&lt;/code&gt;, &lt;code&gt;item.started&lt;/code&gt; and &lt;code&gt;item.completed&lt;/code&gt; for commands, file changes and messages, and finally &lt;code&gt;turn.completed&lt;/code&gt; (with token usage) or &lt;code&gt;turn.failed&lt;/code&gt;. A short &lt;code&gt;jq&lt;/code&gt; filter pulls out the agent's messages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;codex &lt;span class="nb"&gt;exec&lt;/span&gt; --json &lt;span class="s2"&gt;"summarize the repo structure"&lt;/span&gt; \
  &lt;span class="o"&gt;|&lt;/span&gt; jq -r &lt;span class="s1"&gt;'select(.type == "item.completed" and .item.type == "agent_message") | .item.text'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;thread.started&lt;/code&gt; event carries a &lt;code&gt;thread_id&lt;/code&gt;, which is the ID you need to resume that run later.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Force a shape with a JSON Schema.&lt;/strong&gt; &lt;code&gt;--output-schema&lt;/code&gt; takes a schema file and makes the final response match it, so a script gets predictable fields instead of prose:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"object"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"properties"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"project_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"string"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"programming_languages"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"array"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"items"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"string"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"required"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"project_name"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"programming_languages"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"additionalProperties"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;codex &lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="s2"&gt;"Extract project metadata"&lt;/span&gt; --output-schema ./schema.json -o ./project-metadata.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Combining &lt;code&gt;--output-schema&lt;/code&gt; with &lt;code&gt;-o&lt;/code&gt; gives you a JSON file you can load directly in the next step of a pipeline.&lt;/p&gt;

&lt;h2&gt;
  
  
  Continue a run with codex exec resume
&lt;/h2&gt;

&lt;p&gt;Each &lt;code&gt;codex exec&lt;/code&gt; run is saved as a session, just like an interactive one. &lt;code&gt;codex exec resume&lt;/code&gt; sends a follow-up prompt into that session, so Codex keeps everything it already read and decided:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;codex &lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="s2"&gt;"review the change for race conditions"&lt;/span&gt;
codex &lt;span class="nb"&gt;exec&lt;/span&gt; resume --last &lt;span class="s2"&gt;"fix the race conditions you found"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;--last&lt;/code&gt; picks the most recent session. Pass a session ID (or a thread name) to target a specific one, and add &lt;code&gt;--all&lt;/code&gt; if the session was started in another directory, since the lookup filters by the current directory by default. In scripts, read the ID from the &lt;code&gt;thread.started&lt;/code&gt; event of the first run instead of relying on &lt;code&gt;--last&lt;/code&gt;, because a second job on the same machine could create a newer session in between.&lt;/p&gt;

&lt;p&gt;If you do not want a run saved at all, add &lt;code&gt;--ephemeral&lt;/code&gt;. Nothing is written to disk, which suits one-off CI jobs, but it also means that run cannot be resumed. Our &lt;a href="https://vibeide.dev/blog/codex-resume/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;guide to codex resume&lt;/a&gt; covers the interactive picker, forks and naming sessions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Review code with codex exec review
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;codex exec review&lt;/code&gt; runs a code review without the UI. It can review your uncommitted changes, a branch against its base, or a single commit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;codex &lt;span class="nb"&gt;exec&lt;/span&gt; review --uncommitted
codex &lt;span class="nb"&gt;exec&lt;/span&gt; review --base main
codex &lt;span class="nb"&gt;exec&lt;/span&gt; review --commit 1a2b3c4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can add custom review instructions as a prompt, for example asking it to focus on error handling. Because a review reads code rather than changing it, this is a low-risk first step if you are trying &lt;code&gt;codex exec&lt;/code&gt; in a pre-push hook.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run codex exec in CI
&lt;/h2&gt;

&lt;p&gt;The same commands work in CI with a few adjustments:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Authenticate with an API key.&lt;/strong&gt; By default &lt;code&gt;codex exec&lt;/code&gt; reuses saved CLI credentials. On a runner, set &lt;code&gt;CODEX_API_KEY&lt;/code&gt; only for the one command that needs it, for example &lt;code&gt;CODEX_API_KEY=&amp;lt;api-key&amp;gt; codex exec --json "triage open bug reports"&lt;/code&gt;. The documentation (as of October 2026) warns against setting it at the job level in workflows that run code from the repository.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Choose the sandbox deliberately.&lt;/strong&gt; Leave the default read-only sandbox for review and summary jobs. Use &lt;code&gt;--sandbox workspace-write&lt;/code&gt; only for jobs that must edit files, and let the pipeline open a pull request so a person reviews the change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make runs reproducible.&lt;/strong&gt; &lt;code&gt;--ignore-user-config&lt;/code&gt; and &lt;code&gt;--ephemeral&lt;/code&gt; keep a runner's leftovers from changing behavior or piling up session files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On GitHub, use the action.&lt;/strong&gt; The docs recommend the Codex GitHub Action (&lt;code&gt;openai/codex-action@v1&lt;/code&gt;) instead of installing Codex and passing API keys to shell steps yourself.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check MCP servers before you rely on them.&lt;/strong&gt; If the job needs tools from an MCP server, &lt;code&gt;codex mcp list --json&lt;/code&gt; shows what the runner has configured. Our &lt;a href="https://vibeide.dev/blog/codex-mcp/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;Codex MCP guide&lt;/a&gt; covers adding servers, tokens from environment variables and startup timeouts.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Keep project instructions in &lt;code&gt;AGENTS.md&lt;/code&gt; so CI runs follow the same build and test commands as your local sessions. Our guide to &lt;a href="https://vibeide.dev/blog/agents-md-codex/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;AGENTS.md for Codex&lt;/a&gt; explains how Codex finds those files.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common problems
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Symptom&lt;/th&gt;
&lt;th&gt;Likely cause&lt;/th&gt;
&lt;th&gt;Fix&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Codex describes a fix but no file changed&lt;/td&gt;
&lt;td&gt;Default read-only sandbox&lt;/td&gt;
&lt;td&gt;Add &lt;code&gt;--sandbox workspace-write&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Refuses to start in a folder&lt;/td&gt;
&lt;td&gt;Not a Git repository&lt;/td&gt;
&lt;td&gt;Run inside a repo or add &lt;code&gt;--skip-git-repo-check&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Script captures progress noise&lt;/td&gt;
&lt;td&gt;Reading stderr as well&lt;/td&gt;
&lt;td&gt;Read stdout only, or use &lt;code&gt;-o&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Warning about &lt;code&gt;--full-auto&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Deprecated flag&lt;/td&gt;
&lt;td&gt;Replace with &lt;code&gt;--sandbox workspace-write&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;resume --last&lt;/code&gt; picks the wrong run&lt;/td&gt;
&lt;td&gt;Another run is newer&lt;/td&gt;
&lt;td&gt;Resume by the &lt;code&gt;thread_id&lt;/code&gt; from &lt;code&gt;--json&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Different results on CI and laptop&lt;/td&gt;
&lt;td&gt;Personal config loaded&lt;/td&gt;
&lt;td&gt;Add &lt;code&gt;--ignore-user-config&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;When a flag behaves differently from this guide, run &lt;code&gt;codex exec --help&lt;/code&gt;: the installed version is the source of truth for its own options.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How do I execute Codex without the interactive UI?
&lt;/h3&gt;

&lt;p&gt;Run &lt;code&gt;codex exec "your task"&lt;/code&gt; inside a Git repository. Codex works through the task, prints progress to stderr, prints only the final message to stdout and exits, so the command fits shell scripts, git hooks and CI steps.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does codex exec change my files?
&lt;/h3&gt;

&lt;p&gt;Not by default. It runs in a read-only sandbox, so it can read and inspect but not edit. Add &lt;code&gt;--sandbox workspace-write&lt;/code&gt; for a run that has to change files inside the project.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I capture the answer in a script?
&lt;/h3&gt;

&lt;p&gt;Redirect stdout, or use &lt;code&gt;-o answer.md&lt;/code&gt; to write the final message to a file while progress stays in the terminal. For a fixed JSON shape add &lt;code&gt;--output-schema schema.json&lt;/code&gt;; for every step as events add &lt;code&gt;--json&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can codex exec run outside a Git repository?
&lt;/h3&gt;

&lt;p&gt;Only with &lt;code&gt;--skip-git-repo-check&lt;/code&gt;. The repository check guards against changes you cannot roll back, so skip it only in folders you can safely throw away.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where VibeiDE fits
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;codex exec&lt;/code&gt; is ideal for unattended jobs. For the interactive side of the same work, VibeiDE is a desktop app that coordinates the Codex, Claude Code and OpenCode CLIs you already installed, signed in with your own accounts. Codex runs in an embedded terminal that shows the original CLI interface, each project has its own task queue, each task keeps its saved provider conversation so a follow-up continues it instead of re-explaining the context, and finished tasks wait in Ready for review. See the &lt;a href="https://vibeide.dev/for/codex/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;Codex page&lt;/a&gt; or how the &lt;a href="https://vibeide.dev/use-cases/ai-agent-task-queue/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;task queue&lt;/a&gt; works.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;codex exec&lt;/code&gt; runs one task without the UI: progress on stderr, the final message on stdout.&lt;/li&gt;
&lt;li&gt;It is read-only by default; add &lt;code&gt;--sandbox workspace-write&lt;/code&gt; when the task must edit files, and drop the deprecated &lt;code&gt;--full-auto&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;-o&lt;/code&gt; for a clean answer file, &lt;code&gt;--json&lt;/code&gt; for events a script can parse, and &lt;code&gt;--output-schema&lt;/code&gt; for a fixed JSON shape.&lt;/li&gt;
&lt;li&gt;Continue a run with &lt;code&gt;codex exec resume --last&lt;/code&gt;, or by &lt;code&gt;thread_id&lt;/code&gt; in scripts; &lt;code&gt;--ephemeral&lt;/code&gt; skips saving.&lt;/li&gt;
&lt;li&gt;In CI, set &lt;code&gt;CODEX_API_KEY&lt;/code&gt; only for the command that needs it, keep the sandbox tight, and prefer &lt;code&gt;openai/codex-action@v1&lt;/code&gt; on GitHub.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>codex</category>
      <category>ai</category>
      <category>cli</category>
      <category>devops</category>
    </item>
    <item>
      <title>OpenCode desktop app: official app, web UI and GUI options</title>
      <dc:creator>VibeiDE</dc:creator>
      <pubDate>Wed, 04 Nov 2026 21:10:15 +0000</pubDate>
      <link>https://dev.to/vibeidedev/opencode-desktop-app-official-app-web-ui-and-gui-options-36f2</link>
      <guid>https://dev.to/vibeidedev/opencode-desktop-app-official-app-web-ui-and-gui-options-36f2</guid>
      <description>&lt;p&gt;Originally published on &lt;a href="https://vibeide.dev/blog/opencode-desktop-app/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;vibeide.dev&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Yes, OpenCode has an official desktop app. As of October 2026, OpenCode Desktop is a free download for macOS, Windows and Linux on the &lt;a href="https://opencode.ai/download" rel="noopener noreferrer"&gt;OpenCode download page&lt;/a&gt;, and &lt;code&gt;opencode web&lt;/code&gt; opens the same agent in your browser. If you want a graphical view of several OpenCode sessions next to Claude Code and Codex, a multi-agent desktop app is the other option.&lt;/p&gt;

&lt;p&gt;This guide compares every way to run OpenCode outside the plain terminal, shows how to install each one, and helps you pick the right one for how you work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is there an OpenCode desktop app?
&lt;/h2&gt;

&lt;p&gt;Yes. The download page lists &lt;strong&gt;OpenCode Desktop&lt;/strong&gt; next to the terminal version, as of October 2026:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Platform&lt;/th&gt;
&lt;th&gt;Package listed on the download page&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;macOS, Apple Silicon&lt;/td&gt;
&lt;td&gt;DMG&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;macOS, Intel&lt;/td&gt;
&lt;td&gt;DMG&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Windows x64&lt;/td&gt;
&lt;td&gt;NSIS installer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Windows ARM64&lt;/td&gt;
&lt;td&gt;NSIS installer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Linux&lt;/td&gt;
&lt;td&gt;.deb and .rpm&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;macOS with Homebrew&lt;/td&gt;
&lt;td&gt;&lt;code&gt;brew install --cask opencode-desktop&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The desktop app is a front end for the same OpenCode agent, so you still need a provider or a free model. If you have not set one up yet, start with &lt;a href="https://vibeide.dev/blog/install-opencode/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;installing OpenCode&lt;/a&gt; and &lt;a href="https://vibeide.dev/blog/opencode-models/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;choosing a model&lt;/a&gt;, then open the desktop app on your project folder.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do I install the OpenCode desktop app?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Open the &lt;a href="https://opencode.ai/download" rel="noopener noreferrer"&gt;OpenCode download page&lt;/a&gt; and pick the build for your system under OpenCode Desktop.&lt;/li&gt;
&lt;li&gt;On macOS you can install it from the terminal instead:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew install --cask opencode-desktop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;On Windows, run the NSIS installer for x64 or ARM64. If you also use the terminal version on Windows, read &lt;a href="https://vibeide.dev/blog/opencode-windows/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;OpenCode on Windows&lt;/a&gt; for PowerShell and WSL details.&lt;/li&gt;
&lt;li&gt;On Linux, install the &lt;code&gt;.deb&lt;/code&gt; (Debian, Ubuntu) or &lt;code&gt;.rpm&lt;/code&gt; (Fedora, openSUSE) package with your package manager.&lt;/li&gt;
&lt;li&gt;Open a project folder, sign in to a provider or pick a free model, and send a first prompt to check that everything works.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you only want to try OpenCode without paying for a model, the &lt;a href="https://vibeide.dev/blog/opencode-free-models/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;free models guide&lt;/a&gt; lists what OpenCode Zen offers at no cost right now.&lt;/p&gt;

&lt;h2&gt;
  
  
  Can I use OpenCode in the browser?
&lt;/h2&gt;

&lt;p&gt;Yes. The &lt;code&gt;opencode web&lt;/code&gt; command starts a local server and opens a web interface in your default browser, according to the &lt;a href="https://opencode.ai/docs/web/" rel="noopener noreferrer"&gt;OpenCode web docs&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;opencode web
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By default it listens on &lt;code&gt;127.0.0.1&lt;/code&gt; with a random free port. A few flags matter:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Flag or variable&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--port 4096&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Use a fixed port&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--hostname 0.0.0.0&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Listen on all interfaces, for access from another device&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--mdns&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Advertise the server on the local network as &lt;code&gt;opencode.local&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;OPENCODE_SERVER_PASSWORD&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Protect the server with a password&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The docs warn that the server is unsecured without a password, which is fine on localhost and risky on a network. Set &lt;code&gt;OPENCODE_SERVER_PASSWORD&lt;/code&gt; before you use &lt;code&gt;--hostname 0.0.0.0&lt;/code&gt;. You can also attach a terminal to a running server with &lt;code&gt;opencode attach http://localhost:4096&lt;/code&gt;, so the browser and the terminal show the same sessions. On Windows the docs suggest running &lt;code&gt;opencode web&lt;/code&gt; from WSL rather than PowerShell.&lt;/p&gt;

&lt;h2&gt;
  
  
  Can I run OpenCode inside my editor?
&lt;/h2&gt;

&lt;p&gt;Yes, in two ways.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IDE extension.&lt;/strong&gt; OpenCode has an extension for VS Code and forks such as Cursor, Windsurf and VSCodium. Install it from the extension marketplace, then press Cmd+Esc on macOS or Ctrl+Esc on Windows and Linux to open OpenCode in a split terminal. It shares your current selection or tab with the agent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ACP editors.&lt;/strong&gt; &lt;code&gt;opencode acp&lt;/code&gt; runs OpenCode as an Agent Client Protocol server, so editors that speak ACP can host it as their agent. The &lt;a href="https://opencode.ai/docs/acp/" rel="noopener noreferrer"&gt;ACP docs&lt;/a&gt; list Zed, JetBrains IDEs, Avante.nvim and CodeCompanion.nvim. In Zed you can add it from the ACP registry with the &lt;code&gt;zed: acp registry&lt;/code&gt; command, or add this to &lt;code&gt;~/.config/zed/settings.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"agent_servers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"OpenCode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"custom"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"opencode"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"acp"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The docs note that a few slash commands, such as &lt;code&gt;/undo&lt;/code&gt; and &lt;code&gt;/redo&lt;/code&gt;, are not supported over ACP.&lt;/p&gt;

&lt;h2&gt;
  
  
  OpenCode GUI options compared
&lt;/h2&gt;

&lt;p&gt;Every option below runs the same OpenCode agent. They differ in where the window lives and how many sessions you can see at once (as of October 2026).&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Option&lt;/th&gt;
&lt;th&gt;Where it runs&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;th&gt;Several sessions at once&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;OpenCode Desktop&lt;/td&gt;
&lt;td&gt;Native app on macOS, Windows, Linux&lt;/td&gt;
&lt;td&gt;A GUI for one agent&lt;/td&gt;
&lt;td&gt;Sessions inside one app&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;opencode web&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Your browser, served locally&lt;/td&gt;
&lt;td&gt;Remote or second-screen use&lt;/td&gt;
&lt;td&gt;Sessions on one server&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IDE extension&lt;/td&gt;
&lt;td&gt;VS Code, Cursor, Windsurf, VSCodium terminal&lt;/td&gt;
&lt;td&gt;Editing code next to the agent&lt;/td&gt;
&lt;td&gt;One terminal per session&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ACP in Zed or JetBrains&lt;/td&gt;
&lt;td&gt;The editor's agent panel&lt;/td&gt;
&lt;td&gt;Staying inside your editor&lt;/td&gt;
&lt;td&gt;Editor threads&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Squad&lt;/td&gt;
&lt;td&gt;Terminal, tmux sessions&lt;/td&gt;
&lt;td&gt;Keyboard-driven multi-agent work&lt;/td&gt;
&lt;td&gt;Yes, one tmux session per agent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;VibeiDE&lt;/td&gt;
&lt;td&gt;Desktop app for macOS and Windows&lt;/td&gt;
&lt;td&gt;Queuing and reviewing work across OpenCode, Claude Code and Codex&lt;/td&gt;
&lt;td&gt;Yes, per project queues&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If you only use OpenCode, the official desktop app or &lt;code&gt;opencode web&lt;/code&gt; is the simplest choice. The question changes when OpenCode is one of several agents you run every day. For a wider list of multi-agent apps, see &lt;a href="https://vibeide.dev/blog/conductor-alternatives/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;Conductor alternatives&lt;/a&gt; and &lt;a href="https://vibeide.dev/blog/claude-code-gui/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;Claude Code GUI options&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  When a multi-agent desktop app fits better
&lt;/h2&gt;

&lt;p&gt;The official front ends are built around one agent. If you run OpenCode for cheap or free models, Claude Code for hard reasoning and Codex for batch work, you end up with three windows and no single place that says what is running, what is waiting and what is finished.&lt;/p&gt;

&lt;p&gt;VibeiDE is a desktop app that coordinates the Codex, Claude Code and OpenCode CLIs you already installed; macOS is fully validated, Windows is supported and the Linux build is experimental. OpenCode runs headless with recorded activity, while Codex and Claude Code run in embedded terminals. Each project has its own task queue, a task starts when its provider has a free slot, and finished tasks wait in Ready for review. You sign in to your own provider accounts, so model costs stay with your providers. See &lt;a href="https://vibeide.dev/for/opencode/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;VibeiDE for OpenCode&lt;/a&gt; for the details.&lt;/p&gt;

&lt;p&gt;A practical split:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use the OpenCode desktop app or &lt;code&gt;opencode web&lt;/code&gt; while you explore a single change.&lt;/li&gt;
&lt;li&gt;Move to a queue when you have more independent tasks than you can watch, for example several fixes on free models from &lt;a href="https://vibeide.dev/use-cases/free-ai-coding-models/?utm_source=dev.to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=outreach"&gt;the free AI coding models page&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Review each finished task before you start the next one that depends on it.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Is the OpenCode desktop app free?
&lt;/h3&gt;

&lt;p&gt;The desktop app is a free download. You still pay your model provider unless you use a free model, and free model lists change often.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does the OpenCode desktop app replace the terminal version?
&lt;/h3&gt;

&lt;p&gt;No. The download page offers the terminal version and the desktop app side by side, and you can keep using the terminal, the web UI or the IDE extension on the same project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is there an OpenCode GUI for Linux?
&lt;/h3&gt;

&lt;p&gt;Yes. As of October 2026 the download page lists &lt;code&gt;.deb&lt;/code&gt; and &lt;code&gt;.rpm&lt;/code&gt; packages for OpenCode Desktop, and &lt;code&gt;opencode web&lt;/code&gt; works on Linux too.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I use OpenCode from my phone or another computer?
&lt;/h3&gt;

&lt;p&gt;Run &lt;code&gt;opencode web --hostname 0.0.0.0&lt;/code&gt; with &lt;code&gt;OPENCODE_SERVER_PASSWORD&lt;/code&gt; set, then open the server address from the other device on the same network.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;OpenCode Desktop is the official GUI, available for macOS, Windows and Linux as of October 2026.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;opencode web&lt;/code&gt; gives you a browser UI; set a password before exposing it beyond localhost.&lt;/li&gt;
&lt;li&gt;The IDE extension and ACP put OpenCode inside VS Code forks, Zed and JetBrains IDEs.&lt;/li&gt;
&lt;li&gt;For OpenCode plus Claude Code and Codex in one place, use a multi-agent app with queues and review, such as VibeiDE.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>opencode</category>
      <category>ai</category>
      <category>productivity</category>
      <category>devtools</category>
    </item>
  </channel>
</rss>
