Back to Home
Making Codex CLI and Codex.app Use mise-managed Ruby and Node.js

Making Codex CLI and Codex.app Use mise-managed Ruby and Node.js

B
Blizine Admin
·1 min read·0 views

Takashi Masuda Posted on May 30 • Originally published at masutaka.net Making Codex CLI and Codex.app Use mise-managed Ruby and Node.js # codex # mise I mostly use Claude Code, but lately I've been using Codex CLI and Codex.app (hereafter "Codex") more often too. My environment is macOS. However, after I started using mise in [2026-03-29-1] , I ran into trouble because Codex wouldn't use the mise-managed Ruby, Node.js, and so on. Here's the state I was in: $ where ruby /usr/bin/ruby $ ruby --version ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin25] Enter fullscreen mode Exit fullscreen mode The Solution I solved it by adding the following to ~/.zshenv : # When Codex CLI and Codex.app run commands, .zshrc's mise activate zsh doesn't take effect, # so add mise shims to PATH. if [ -n " $CODEX_SANDBOX " ] ; then PATH = ${ XDG_DATA_HOME } /mise/shims: $PATH fi Enter fullscreen mode Exit fullscreen mode Here's the state inside Codex after the change: $ where ruby /Users/masutaka/.local/share/mise/shims/ruby /usr/bin/ruby $ ruby --version ruby 4.0.5 (2026-05-20 revision 64336ffd0e) +PRISM [arm64-darwin25] Enter fullscreen mode Exit fullscreen mode Codex's Command Execution Environment Is a Sandbox I'd vaguely suspected this for a while, but it seems Codex's command execution environment runs inside a sandbox. You can spot the clues from within Codex: $ env | grep CODEX CODEX_CI=1 CODEX_SANDBOX=seatbelt CODEX_THREAD_ID=019e7806-6025-7c13-a3c6-a70d41c13905 Enter fullscreen mode Exit fullscreen mode "seatbelt" refers to Apple Seatbelt, which appears to be macOS's sandboxing mechanism. 🔗 macOSで手軽にSandbox環境を構築できるApple Seatbeltの実践ガイド しかしながら、Apple Seatbeltは公式にドキュメントを公開されておらず、非推奨とされています。一方で実際には多くのアプリケーションやツールで使用されています。 (English translation) However, Apple Seatbelt has no officially published documentation and is considered deprecated. Yet in practice, it's used by many applications and tools. I see... According to this article, Claude Code also adopts A

📰Dev.to — dev.to

Comments