@SaitoWu: https://x.com/SaitoWu/status/2069076084495438186
Summary
This article describes using the Codex AI agent to automatically migrate terminal shell configuration from Oh My Zsh to Zinit + Starship + Rust toolchain, demonstrating the AI's ability to perform engineering steps such as backup, key isolation, and performance analysis, ultimately achieving an order-of-magnitude improvement in startup speed.
View Cached Full Text
Cached at: 06/22/26, 05:49 PM
Make Codex Boost Your Terminal Startup Speed by 10x
Recently I decided to replace Oh My Zsh, which I’ve used for years, with a modern lightweight setup: Zinit + Starship + Rust toolchain (eza/bat/fzf/zoxide).
But instead of painstakingly typing everything myself, I simply threw the entire design document at Codex and let it handle the migration, tuning, and verification on my real macOS environment. The whole process revealed an interesting point: the difference between an agent doing work and a human doing work isn’t about knowing how to write configurations—it’s about whether you set up “verification checkpoints” at every step.
First, the current situation assessment
The problem with Oh My Zsh isn’t that its plugins are bad—it’s that it loads a ton of unnecessary stuff every time a shell starts. The half-second delay was something everyone tolerated as “the cost of doing business,” but nowadays more and more people can’t stand it anymore.
The core idea of the new camp is to switch to on-demand loading:
| Component | Function | Replaces |
|---|---|---|
| Zinit | Plugin manager with lazy-load support | OMZ framework itself |
| Starship | Cross-shell prompt | Powerlevel10k |
| zoxide | Smart cd | cd / autojump |
| eza / bat / fd / rg | Rust-rewritten basic commands | ls / cat / find / grep |
| fzf | Fuzzy search | Ctrl+R native history |
The goal was to compress startup time from OMZ’s hundreds of milliseconds down to under 120ms.
How Codex handled it
I sent the design doc with just this one sentence: “Use Zinit’s lazy-load to replace Oh My Zsh’s full load, keep the git aliases you actually use from OMZ, add the Rust toolchain feel**.” Then I added: “Help me configure my current shell environment—I’m using oh my zsh—delete OMZ directly and enable this form.” What happened next was more “engineering-heavy” than I expected:
1. Back up first, then act. Instead of directly overwriting ~/.zshrc, it first confirmed that my current config, besides OMZ, also included mise, Bun, pnpm, DYLD_LIBRARY_PATH, and several API key exports. These were “existing assets” that had to be preserved intact—they couldn’t be accidentally deleted during the framework migration.
2. Extract secrets from the main config. It moved all secret-key exports into a separate ~/.zshrc.local, and the main config only sources it. This action wasn’t in the design document—it was something Codex decided to add on its own, judging that “framework config and secrets shouldn’t be mixed together.”
3. Syntax check before deletion. After writing the new config, it first ran a syntax check to confirm the Starship config could be parsed correctly by the current version, then executed the irreversible operations of backup, writing, and OMZ deletion.
4. The validation environment itself might be lying. During the first round of speed tests, the “pseudo-interactive” environment zsh -i -c threw ZLE-related errors and unrealistically slow times (with network wait from the first-time plugin downloads). It didn’t treat these noise as real problems to “optimize away”—instead, it first identified the noise source, distinguishing between “is this a problem that will happen in a real terminal?” and “is this just an artifact of the test method itself?” Eventually it pinpointed that fzf --zsh was trying to bind keybindings in a non-TTY environment, so it added a condition to only load in real terminal sessions, rather than simply cutting features to get a prettier test number.
5. Use profiling instead of guessing. When optimization stalled at 0.27s, it didn’t keep tuning by gut feeling—it wrapped in zprof and measured that Zinit’s OMZ snippets took about 20ms, compinit about 13ms, and mise’s initialization (which forks a subprocess every time) was the biggest chunk at about 70ms via mise activate zsh --shims.
6. Targeted fixes, not blanket lazy loading. After finding the bottleneck, it changed several ZLE-related plugins (fzf-tab, autosuggestions, syntax-highlighting) and OMZ snippets to use Zinit’s turbo delayed loading—ensuring the prompt appears first, then functional plugins load transparently afterwards. For mise, it didn’t simply delay it—it directly replaced it with a zero-fork PATH injection method, skipping the entire subprocess overhead.
What this tells us
In the end, the migration didn’t precisely hit the 120ms target (the median bounced between 0.27s–0.66s), but compared to OMZ’s original experience, it was already an order-of-magnitude improvement. More than the final number, I care about these specific actions during the process:
- Before irreversible operations (deleting OMZ), always back up and verify first
- When you measure a “problem,” first suspect whether the test method itself is flawed, instead of rushing to optimize
- When stuck, use a profiling tool instead of continuing to tune by feel
- Optimization must be contextual—delay loading where appropriate, change implementation where appropriate, not a one-size-fits-all approach
This “engineering discipline” used to require experience accumulation. Now when Codex handles tasks like configuration migration, it already takes these as default actions. For independent developers, this means many tedious chores where “I know what to do but can’t be bothered to be careful at every step” can be confidently handed off.
Appendix: The exact words I gave to Codex
Use Zinit’s lazy-load to replace Oh My Zsh’s full load, keep the git aliases you actually use from OMZ, add the Rust toolchain feel**. The migration path is smooth—preserve muscle memory, remove extra overhead, use
zinit snippet OMZP::gitand similar methods to on-demand introduce OMZ plugins. If you’re currently using Oh My Zsh, you can directly replace it with this scheme without uninstalling OMZ first. If you want me to adjust aliases or Starship display content based on your specific Node/Go/Podwise workflow, just say so. Help me configure my current shell environment according to the above scheme—I’m using oh my zsh—delete OMZ directly and enable this form.
Just that one sentence. Everything else—backup, secrets isolation, syntax checks, noise identification, profiling, scenario-specific optimization—were all execution steps it broke down on its own.
Similar Articles
@thinkszyg: https://x.com/thinkszyg/status/2066837941477920993
A practical guide for developers (especially AI coding tool users) on how to safely and efficiently use Claude Code, Codex, and other tools for multi-agent parallel development, focusing on best practices such as task decomposition, file isolation (worktree), boundary control, sequential merging, etc., to avoid file conflicts and chaos.
@NFTCPS: Multiple AI agents working together? Finally someone pulled it off with the most down-to-earth approach. squad, a command-line tool written in Rust, lets Claude Code, Gemini CLI, Codex, and OpenCode — these CLI agents — sit at the same table and collaborate.…
squad is a command-line tool written in Rust that enables collaboration among multiple AI CLI agents (such as Claude Code, Gemini CLI, etc.) via shell commands and an SQLite database, without requiring a background daemon.
@sunmer575399: Stumbled upon a god-tier open-source project, Cline, with 65.6k stars. It really boosts coding efficiency. One engine powers the SDK, CLI, VS Code, and the entire JetBrains suite. Click twice in the editor, and it reads code, creates files, runs commands, and after making changes, waits for your nod before proceeding. Run full-auto in the terminal...
Introducing the open-source AI coding agent tool Cline, supporting the SDK, CLI, VS Code, and the JetBrains suite. It can automatically read code, create files, and run commands in the IDE and terminal, and supports kanban-based parallel multi-agent workflows and CI/CD integration.
@dotey: https://x.com/dotey/status/2057250417638035555
This article shares usage tips from the Codex official team, including persistent conversation flow, voice input, task intervention and queuing, tool integration, automation, and goal setting, to help users get the most out of Codex, an AI coding agent.
@Saccc_c: https://x.com/Saccc_c/status/2058057029810594206
The article provides a detailed introduction to OpenAI's AI Agent desktop application, Codex App, covering its core features (local file read/write, web search, software control, automation, etc.), installation steps, usage tips, and differences from ChatGPT, helping users get started quickly.