#codexcli
Researchers Escape OpenAI Codex Sandbox to Run Commands on Host #AICodingAgents #CodexCLI #CodexSandboxEscape
Researchers Escape OpenAI Codex Sandbox to Run Commands on Host
In OpenAI Codex, security researchers have identified two sandbox escape vulnerabilities, one of which allows developers to execute commands on their machine without prompting them. The vulnerabilities, Heapjack and Overpatch, affect different parts of the coding agent's security boundary.  The vulnerability was reported to OpenAI by Accomplish AI on August 12. According to the researcher, Codex fixed both issues within eight days. The more serious Heapjack vulnerability demonstrated that malicious code could move beyond the restrictions imposed by Codex's sandbox, even when the agent was running as a read-only application.  Heapjack Breaks the Sandbox Boundary The node_repl component installed with Codex Desktop is targeted by heapjack. Although both OpenAI and untrusted agent code are run in separate JavaScript contexts, both operate within the same Node.js process and share the same memory heap, the separation was not sufficiently effective in preventing a security token from coming into contact with an untrusted environment.  By inspecting the process heap, it was possible to obtain the token generated for the trusted context that remained in shared memory. When the token was obtained, the untrusted code could interact with a native parent process outside the sandbox using the communication channel used by the trusted context. As part of the demonstration of the technique, the researchers launched an application outside of Codex's process tree by utilizing the open command.  A Unix socket as well as other system-level interfaces could also be reached through this access. This demonstration was especially important since it occurred while Codex was running in a strict read-only sandbox mode, where the agent was not expected to have any writing access to the wider system.  The attack could be triggered by a seemingly routine development process. The researchers demonstrated a scenario in which malicious content contained in a repository, created by a third party, could exploit the vulnerability after the repository was opened in Codex and a query about its code was made.  Overpatch Expands Write Access Second, a vulnerability known as Overpatch affects the open-source Codex command line utility, and it takes an alternative route outside the sandbox. The vulnerability affects the application_patch tool used by Codex to modify files.  In workspace-write mode, Codex is intended to limit file changes to the project directory. Researchers discovered that apply_patch, instead of expanding write permissions, could expand them based on paths included in patches. By using a path such as /tmp, the tool was able to treat the root of the file system as an accessible parent directory. In addition to the permission extension, researchers modified .zshrc by creating a symbolic link to the user's home directory so that it would be modified as well. A successful write was not required for the /tmp entry; its presence extended the permissions granted to the patch operation. A modified shell configuration resulted in a file modification outside of the permitted workspace without an approval prompt. When a new terminal session was launched, attacker-controlled content ran.  Two Flaws, One Security Boundary Problem It is important to note that though Heapjack and Overpatch affect different parts of the Codex, both expose weaknesses in the way in which the security boundary of the agent was enforced. In the case of Overpatch, the tool responsible for applying changes also determined the scope from which it had access to data.  In heapjack, trust boundaries were similarly compromised, as the token separating trusted and untrusted execution remained accessible in the same Node.js process and memory space as the untrusted code. The findings suggest that AI coding agents can be restricted in other ways than just controlling their abilities to execute commands.  Untrusted agent activity must also be prevented from influencing the mechanisms that enforce those restrictions by the tools, processes and interfaces surrounding the model. On August 12, 2026, OpenAI was notified of the issues, and they were both addressed within eight days by Accomplish, who stated that Overpatch was addressed in Codex CLI 0.149.0, while Heapjack had been addressed in Codex Desktop build 26.818.21641. A later statement by OpenAI confirmed that both issues had been resolved in August, and that additional measures were being taken to strengthen file-write controls and expand sandbox testing across platforms. These findings emphasize the security challenges associated with maintaining strong isolation in AI coding environments. Codex Desktop and Codex CLI have been updated to address both vulnerabilities.
dlvr.it
September 21, 2026 at 2:29 PM
Researchers found 2 sandbox escapes in OpenAI Codex, including Heapjack and Overpatch, that could let attacker-controlled code run host commands. OpenAI patched both; update Codex now. #OpenAICodex #Heapjack #Overpatch
Researchers Escape OpenAI Codex Sandbox To Run Commands On Host
Researchers uncovered two sandbox escapes in OpenAI Codex, including Heapjack and Overpatch, that could let attacker-controlled code run commands outside Codex’s intended restrictions. OpenAI patched both issues quickly, and users are advised to update to Codex Desktop build 26.818.21641 or Codex CLI 0.149.0 and later. #OpenAICodex #Heapjack #Overpatch #CodexDesktop #CodexCLI
www.hendryadrian.com
September 20, 2026 at 2:45 PM
「確信度: 低」と書いてある指摘から、先に疑う。

レビューを頼むとき、指摘ごとに確信度を高・中・低で自己申告させる欄を依頼文に入れる。それだけ。
・重大度/箇所/根拠/修正案/確信度の5点
・確信が持てない指摘は「低」と明記させる
・推測を断定で書かせない

採否の判断が、この1欄でかなり楽になる。
断定で書かれた推測を、私は何度も採った。

https://www.amazon.co.jp/dp/B0HH4P92HX

#ClaudeCode #CodexCLI #コードレビュー
September 19, 2026 at 8:42 AM
「良い感じに直して」は、受け入れ条件にならない。
良い感じかどうかを、誰も判定できないからだ。私も含めて。

委譲の前に決めるのは、機械で確かめられる形。
・入力: このファイル
・出力: 「ファイル:行番号: 規則ID メッセージ」の形
・終了コード: 0=問題なし/1=問題あり/2=読めない

ここまで書けたら投げる。書けないなら、まだ投げない。
書けない日は、私が何を作りたいか分かっていない。

https://www.amazon.co.jp/dp/B0HH4P92HX

#ClaudeCode #CodexCLI #AIコーディング
September 18, 2026 at 1:33 PM
「修正しました。テストも通っています」
この報告は、テストが0件でも成立する。

実行された件数が0なら、失敗も0。
報告の上では成功と区別がつかない。
私は0件の緑を、しばらく信じていた。

・成功/失敗/スキップの件数を貼らせる
・終了コードを一緒に貼らせる
・0件と全スキップは失敗と同じ扱いにする

通ったか、ではなく、何件通ったか。

https://www.amazon.co.jp/dp/B0HH4P92HX

#ClaudeCode #CodexCLI #AIコーディング
September 18, 2026 at 3:58 AM
AI に作業を投げる前に、私が書く3行。

1: 入力は、このファイル
2: 出力は、「ファイル:行番号: 規則ID メッセージ」の形
3: 終了コードは、0=問題なし/1=問題あり/2=読めない

3行とも書けたら投げる。
1行でも書けないなら、投げない。まだ私が何を作りたいか決まっていない。
「良い感じに直して」は、この3行のどれにもならない。

https://www.amazon.co.jp/dp/B0HH4P92HX

#ClaudeCode #CodexCLI #AIコーディング
September 17, 2026 at 12:03 AM
「動きました」と報告が来たあと、私がやる順番。

1: テストを書いたのが誰か確かめる。AI なら、採点も AI だ
2: 受け入れ条件と照らす。条件が無ければ、ここで止まる
3: 壊す入力を1つ渡す。空のファイル、読めない文字、桁が1つ多い数字
4: 3 で落ちなければ、初めて「動いた」と書く

順番を飛ばした日は、だいたい翌日に戻ってくる。
テストが通った。書いた本人が採点した。

https://www.amazon.co.jp/dp/B0HH4P92HX

#ClaudeCode #CodexCLI #AIコーディング
September 16, 2026 at 6:04 AM
レビューを頼むとき、私が依頼文に固定している5行。
相手は Codex でも Claude Code でも同じ。

1: 変更したファイルの一覧を渡す
2: 指摘は「重大度/箇所/根拠/修正案/確信度」の5点で書かせる
3: 確信が持てない指摘には「確信度: 低」と明記させる
4: 「低」から先に、私が確かめる
5: 断定で書かれた推測には、根拠の行番号を出させる

迷わなくなったのではない。迷う場所が決まった。

https://www.amazon.co.jp/dp/B0HH4P92HX

#ClaudeCode #CodexCLI #コードレビュー
September 15, 2026 at 11:57 PM
併用すると、片方だけでは起きない失敗が出る。
私が出した。

・別々の指示ファイルを読んで食い違う
・同じファイルを両方が書き換える
・2つとも同じ見落とし

対処は第6章。9/12(土)16:00〜9/15(火)15:59 は無料。

https://www.amazon.co.jp/dp/B0HH4P92HX

#ClaudeCode #CodexCLI #AIコーディング
September 15, 2026 at 4:12 AM
「編集3回」「新規100行」「2回失敗」。

Claude Code と Codex CLI のどちらに投げるか、私はこの数字で決めている。
勘の頃は、毎回迷った。

判断基準をまとめた本、9/12(土)16:00〜9/15(火)15:59 は無料。

https://www.amazon.co.jp/dp/B0HH4P92HX

#ClaudeCode #CodexCLI #AIコーディング
September 14, 2026 at 4:52 PM
MCPで片方から片方を呼ぶ設定。
どこから始めるか、最初の私も分からなかった。

Claude CodeからCodex CLIを呼ぶ設定と、逆向きの組み方を第1弾に書いた。
9/15(火)15:59 まで無料。

https://www.amazon.co.jp/dp/B0HH4P92HX

#ClaudeCode #CodexCLI
September 14, 2026 at 4:11 AM
2つのAIを併用したら、同じ失敗を2倍見逃す。
私がやった。

併用したときだけ起きる失敗と対処を、第1弾にまとめた。
9/15(火)15:59 まで無料。

https://www.amazon.co.jp/dp/B0HH4P92HX

#ClaudeCode #CodexCLI
September 13, 2026 at 2:51 PM
Claude CodeとCodex CLI、どちらに何を投げるか毎回迷っていませんか。
第1弾は9/15(火)15:59 まで無料です。
作業量や失敗回数で振り分ける判断基準が学べます。

https://www.amazon.co.jp/dp/B0HH4P92HX

#ClaudeCode #CodexCLI
September 13, 2026 at 12:05 AM
Claude Code から Codex CLI を呼ぶ設定は、
MCP を使えば組めます。

・設定ファイルの書き方
・スレッドを乱立させない呼び方
・逆向き(Codex から Claude)の組み方

この手順を載せた本が、9/12(土)16:00〜9/15(火)15:59 は無料です。

https://www.amazon.co.jp/dp/B0HH4P92HX

#ClaudeCode #CodexCLI #MCP
September 12, 2026 at 10:05 AM
Claude Code と Codex CLI の併用本、
9/12(土)16:00〜9/15(火)15:59 は無料です。

・どちらに何を投げるかの閾値
・MCP で片方から片方を呼ぶ設定
・意見が割れたときの裁定

全10章。コマンドと出力は実機で採ったものだけです。

https://www.amazon.co.jp/dp/B0HH4P92HX

#ClaudeCode #CodexCLI
September 11, 2026 at 11:51 PM
AIエージェントを2つ使っていて、
毎回どちらに投げるか迷うなら。

・編集が3回以上になりそう
・新規で100行以上書かせる
・同じバグで2回失敗した

この3つを閾値にすると迷いません。
根拠を書いた本を 9/12(土)16:00 から3日間 無料にします。

https://www.amazon.co.jp/dp/B0HH4P92HX

#ClaudeCode #CodexCLI #AIコーディング
September 11, 2026 at 8:46 AM
9/12(土)16:00 から3日間、
Claude Code と Codex CLI の併用本を無料にします。

・どちらに何を投げるかの閾値
・MCP で片方から片方を呼ぶ設定
・併用したときだけ出る失敗と対処

通常 ¥580、全10章です。

https://www.amazon.co.jp/dp/B0HH4P92HX

#ClaudeCode #CodexCLI
September 9, 2026 at 11:48 PM
「動きました」という自己申告より、速くて確実な確認方法があります。
返ってきたコードで最初にやるのは、テストではなく --help を出させることです。
想定どおりのものが返ってきたか、それだけで分かります。

#CodexCLI #個人開発
September 8, 2026 at 11:32 AM
「動きました」という自己申告より、速くて確実な確認方法があります。
返ってきたコードで最初にやるのは、テストではなく --help を出させることです。
想定どおりのものが返ってきたか、それだけで分かります。

#CodexCLI #個人開発
September 8, 2026 at 11:27 AM
AIは自分が書いたコードのミスを見落とします。だから別系統のAIにレビューさせています。
ただし毎回やると往復が増えるので、重要な変更だけに絞るべきかもしれません。
全部レビューさせますか、絞りますか?

#ClaudeCode #CodexCLI
September 7, 2026 at 11:58 PM
「あと2箇所直せば終わる」と思ってから3箇所目が出てきたら、手を止めて投げ直したほうが速いです。
編集3回がだいたいの境目になります。

#ClaudeCode #CodexCLI
September 7, 2026 at 9:08 AM
設定ファイルをいくら睨んでも繋がらない。
切り分けはJSONの破損・PATH・認証切れ・プロセス未起動の4つです。
先に codex doctor と codex mcp list を叩くほうが速いです。

#CodexCLI #MCP
September 6, 2026 at 4:03 PM
「1タスク1スレッド」に固定していますが、どこでタスクを切るかは決めきれていません。
機能単位か、ファイル単位か、1日単位か。
スレッドの粒度、どう決めていますか?

#ClaudeCode #CodexCLI
September 5, 2026 at 3:52 PM
2つのAIが同じファイルを書き換えて壊れたとき、戻せるかどうかは事故の前に決まっています。
バージョン管理下に無ければ、戻す先がありません。
git status が打てる状態か、投げる前に確かめてください。

#ClaudeCode #CodexCLI
September 5, 2026 at 8:13 AM