`go vet ./...` fails on macOS because `~/Library/Caches` is not allowed to be used in the codex sandbox

Resolved 💬 4 comments Opened Sep 16, 2025 by ZerGo0 Closed Nov 26, 2025

What version of Codex is running?

codex-cli 0.36.0

Which model were you using?

gpt-5-codex

What platform is your computer?

Darwin 25.0.0 arm64 arm

What steps can reproduce the bug?

  1. Create a simple hello world golang project
  2. Tell codex to run go vet ./...

The command should fail and the model sometimes sets the 'GOCACHE` env var to a directory in the current directory or just tells you to run the command yourself.

What is the expected behavior?

The command should run without a problem

What do you see instead?

~/Library/Caches should be on the allowed list on macOS, since Apple recommends that developers use that directory to cache stuff: https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html

Additional information

Current fix:
.zshrc

# Codex go vet ./... fix
export GOCACHE="/tmp/go-cache"

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗