Skip to content

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

@ZerGo0

Description

@ZerGo0

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsandboxIssues related to permissions or sandboxing

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions