Apple could not verify "rg" is free of malware that may harm your Mac
Strip the quarantine flag: `xattr -d com.apple.quarantine /opt/homebrew/Caskroom/codex/<version>/codex-path/rg`, or delete that bundled binary so Codex falls back to a ripgrep on your PATH. For the durable fix, run `brew reinstall --cask codex` — the cask reverted to OpenAI's signed standalone tarball on July 10, 2026, after the unsigned bundled rg briefly returned in 0.144.1.
Affected versions: Homebrew cask installs only: ~0.139.0–0.140.0 (mid-June 2026) and 0.144.1 pulled on July 10, 2026
Since mid-June 2026, macOS users who installed the Codex CLI through Homebrew have hit a Gatekeeper popup every time the agent searches their repo. The full dialog reads: “rg” Not Opened. Apple could not verify “rg” is free of malware that may harm your Mac or compromise your privacy. The blocked binary is ripgrep, the search tool Codex bundles — and since agentic coding is mostly searching, the popup makes sessions unusable.
Symptoms
- Any prompt that triggers a repo search (the original report asked Codex to search for
@Dependency) showsExploring → Search, then macOS throws the popup with Move to Trash / Done buttons — on every search, not once per session. codex doctorlists the search provider asbundled(issue #28190).
Cause
Gatekeeper quarantines the ripgrep binary the Homebrew cask installs at /opt/homebrew/Caskroom/codex/<version>/codex-path/rg. In June the cask started pulling OpenAI’s codex-package release asset, which bundles an rg that lacks OpenAI’s digital signatures, so macOS refuses to run it. An OpenAI engineer (etraut-openai) confirmed on the issue that “this regression is rooted in a recent change in Homebrew,” and homebrew-cask PR #269956 fixed it on June 16 by reverting the cask to the bare codex tarball.
The fix held until July 10, when PR #274248 switched the cask back to the packaged asset — this time to ship the codex-code-mode-host binary that 0.144.0 needed — and fresh reports landed the same day (“rg issue came back in codex-cli 0.144.1”). Homebrew merged a second revert, PR #274340, that same day, moving the cask to the standalone 0.144.1 tarball.
Fix
- Remove the quarantine flag from the bundled binary, adjusting the version to match your install — the top workaround in the thread:
xattr -d com.apple.quarantine /opt/homebrew/Caskroom/codex/<version>/codex-path/rg - Or delete that
rgfile entirely — users on the issue report Codex then resolves ripgrep from your PATH (brew install ripgrepif you don’t have one). - For a clean slate, run
brew reinstall --cask codex. The cask has pointed at the standalone signed tarball since PR #274340 merged on July 10, and OpenAI asked affected users to reinstall and confirm after the June fix. - If the popup returns after a future update, check issue #28190 — it remains open, and the cask has regressed to the packaged asset twice already.
Affected versions
Two Homebrew cask windows: roughly 0.139.0–0.140.0 in mid-June 2026, and 0.144.1 installed on July 10, 2026, between the two cask PRs. Every report on the issue traces to the Homebrew cask — the maintainer’s first question was whether reporters had installed via Homebrew.
Facts on this page verified July 15, 2026.
- openai/codex #28190 — 'rg is blocked by macOS' (open, with maintainer replies)
- homebrew-cask PR #269956 — 'codex: use bare release asset' (first revert, merged Jun 16)
- homebrew-cask PR #274248 — 'codex: install codex-code-mode-host binary' (reintroduced the packaged asset, Jul 10)
- homebrew-cask PR #274340 — 'codex: revert to standalone codex tarball' (second revert, merged Jul 10)