You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Asks for permission to run command xcodebuild, even after permitting all xcodebuild commands #10321
What terminal emulator and version are you using (if applicable)?
Warp
What issue are you seeing?
I granted permission to run all xcodebuild commands by selecting the "Yes, and don't ask again" option from the CLI. Then in future runs, even when running the same command with the same set of arguments, it still asks for sandboxing permissions. This persists even after quitting and restarting the codex CLI.
I am not running with dangerous permissions. I'm only running codex for my conversations.
What steps can reproduce the bug?
Prompt the agent to run the command xcodebuild -scheme Hubble -destination 'generic/platform=iOS' │ -quiet CODE_SIGNING_ALLOWED=NO build 2>&1.
Notice the agent tries to run this command and receives a sandbox error (seems odd it doesn't ask me and intentionally needs to fail first)?
Select option 2, "Yes, and don't ask again"
On a future turn, prompt to run the same xcodebuild ... command again. The sandbox permissions error reoccurs unexpectedly.
What is the expected behavior?
I should not have to grant permissions again for the current session and all future CLI sessions.
@etraut-openai I just confirmed that it is running with the exact same set of arguments. Andn @dylan-hurd-oai here is the feedback ID: 019c171d-d6a4-7690-a080-3994dbb86bda
To clarify, the command being run is xcodebuild -scheme Hubble -destination 'generic/platform=iOS' -quiet CODE_SIGNING_ALLOWED=NO build 2>&1. This is listed in my project rules file:
Rules
Always run pnpm convex typecheck to check your work when updating convex files.
To check if the app builds, run an applicable variant of: xcodebuild -scheme Hubble -destination 'generic/platform=iOS' -quiet CODE_SIGNING_ALLOWED=NO build 2>&1
Don't commit code for me. I'll ask you to.
Overview
Hubble is an iOS/macOS app with a Convex backend. Built with XCode, with packages tracked in XCode.
For permission updates, instruct user on what to update in Xcode (ex. add microphone permissions in Target > Info).
Data Model
Note: Voice/text note with transcript
Lens: User-defined filter/tag for organizing notes
NoteLens: Join table linking notes to lenses (many-to-many)
Conventions
Views in Views/, reusable components in Views/Components/, modifiers in Views/Modifiers/
Services handle external APIs, device managers, and AI features
Convex functions: queries for reads, mutations for writes, actions for AI/external calls
HTTP endpoints in convex/http.ts for streaming responses
Services/NoteRepository.swift — Local CRUD, findByStableId(), upsertFromServer()
Services/LensRepository.swift — Same pattern for lenses
Services/SyncEngine.swift — Coordinates push/pull with Convex
Services/NetworkMonitor.swift — Detects connectivity changes, triggers sync on reconnect
Sync Behavior
On app launch:
Load from SwiftData immediately (no auth required)
Authenticate with Convex
syncAll() → push pending changes, then start subscriptions
On edit:
Save to SwiftData with syncStatus = .pendingUpdate
Push to Convex in background
Subscriptions paused during push to prevent race conditions
On reconnect (airplane mode off):
NetworkMonitor detects connection restored
Triggers syncAll() automatically
Conflict Resolution
Device always wins. Push happens before pull, so offline edits overwrite server. The lastModifiedLocally timestamp is compared against serverNote.updatedAt only for incoming pull data — if local has pending changes with a newer timestamp, server data is ignored.
Schema Migrations
SwiftData uses HubbleMigrationPlan for versioned schemas. On schema mismatch (dev only), the local store auto-deletes and re-syncs from Convex.
Voice Input & AI
The user can interact with the Hubble Agent through voice or text. This agent is managed in Convex.
Transcription
Services/SpeechTranscriberManager.swift — Apple Speech transcription
Services/ParakeetTranscriberManager.swift — Enhanced local transcription
Services/TranscriptionSettings.swift — User transcription preferences
any updates here? anybody knows how to fix it? this is insane that you have to approve it every 5 minutes. I've tried to add as set of rules, but it didn't work:
prefix_rule(
pattern = ["xcodebuild"],
decision = "allow",
justification = "Allow local build and test invocations without approval prompts.",
match = [
"xcodebuild -project table-ai.xcodeproj -scheme table-ai build",
"xcodebuild test -project table-ai.xcodeproj -scheme table-ai -destination platform=macOS",
],
not_match = [
"xcrun xcresulttool get --path .build/DerivedData/Logs/Test/result.xcresult --format json",
],
)
I have the same issues with commands like this one: xcodebuild -workspace ./ProjectName.xcworkspace -scheme ProjectName -configuration Debug -destination 'id=F94783BB-3585-4762-B652-656912287576' build > /tmp/cw_settings_build.log 2>&1;
When I instructed Codex to run "pure" xcodebuild commands instead, it seems to have fixed the issue.
The following command was run unsandboxed without approval, as expected:
So the bug might have something to do with the output redirects.
While troubleshooting, I had also added this to my default.rules, but it did not work:
I have this issue in general with most commands. I have a rules file for all the commands I want to auto-approve. If I use --ask-for--aproval=untrusted, it still prompts me to accept the commands, even if my ~/.codex/rules/<cmd>.rules file allows it.
Overall, this issue + my experience makes me think the rules and command approvals are not working as expected.
So the current state of things on Windows is quite bad. You can't use the new sandbox because then Codex can't even read files. With the older sandbox, Codex can't run tests in a sandbox because of the EPERM issue. It can escalate and run them outside a sandbox, but it can't remember that it's allowed to run tests. So in a session where its troubleshooting failing tests, you have to sit there and approve it again and again.
Actually it's happening again now, asking every time to run tests...
Yeah it seems that the prefix rules require exact full commands with PowerShell commands for Windows sandboxing. I described my similar issue I am still having here: #8537 (comment)
Add xcodebuild.sh in Codex default.rules: prefix_rule(pattern=["sh", "xcodebuild.sh"], decision="allow")
Ask Codex to use xcodebuild.sh for any project build, or write a skill for it:
In the future, always call any xcodebuild via xcodebuild.sh with the addition of the rest of the command, for example:
sh xcodebuild.sh "│ -quiet CODE_SIGNING_ALLOWED=NO build 2>&1"
Activity
github-actions commentedon Feb 1, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
network_access = true#9298Powered by Codex Action
etraut-openai commentedon Feb 1, 2026
Are subsequent commands exactly the same as the first one that you approved, or do they differ in their arguments?
dylan-hurd-oai commentedon Feb 1, 2026
@bholmesdev could you use
/feedbackand share the session id?bholmesdev commentedon Feb 1, 2026
@etraut-openai I just confirmed that it is running with the exact same set of arguments. Andn @dylan-hurd-oai here is the feedback ID:
019c171d-d6a4-7690-a080-3994dbb86bdabholmesdev commentedon Feb 1, 2026
To clarify, the command being run is
xcodebuild -scheme Hubble -destination 'generic/platform=iOS' -quiet CODE_SIGNING_ALLOWED=NO build 2>&1. This is listed in my project rules file:Rules
pnpm convex typecheckto check your work when updating convex files.xcodebuild -scheme Hubble -destination 'generic/platform=iOS' -quiet CODE_SIGNING_ALLOWED=NO build 2>&1Overview
Hubble is an iOS/macOS app with a Convex backend. Built with XCode, with packages tracked in XCode.
For permission updates, instruct user on what to update in Xcode (ex. add microphone permissions in Target > Info).
Data Model
Conventions
Views/, reusable components inViews/Components/, modifiers inViews/Modifiers/convex/http.tsfor streaming responsesFolder Structure
Commands
Local-First Sync Engine
The app uses a local-first architecture with SwiftData for offline support. Data loads instantly from local storage; Convex syncs in the background.
Key Files
Models/LocalModels.swift— SwiftData models (LocalNote,LocalLens) with sync metadata (serverId,syncStatus,lastModifiedLocally)Models/SyncStatus.swift— Enum:.synced,.pendingCreate,.pendingUpdate,.pendingDeleteServices/NoteRepository.swift— Local CRUD,findByStableId(),upsertFromServer()Services/LensRepository.swift— Same pattern for lensesServices/SyncEngine.swift— Coordinates push/pull with ConvexServices/NetworkMonitor.swift— Detects connectivity changes, triggers sync on reconnectSync Behavior
On app launch:
syncAll()→ push pending changes, then start subscriptionsOn edit:
syncStatus = .pendingUpdateOn reconnect (airplane mode off):
NetworkMonitordetects connection restoredsyncAll()automaticallyConflict Resolution
Device always wins. Push happens before pull, so offline edits overwrite server. The
lastModifiedLocallytimestamp is compared againstserverNote.updatedAtonly for incoming pull data — if local has pending changes with a newer timestamp, server data is ignored.Schema Migrations
SwiftData uses
HubbleMigrationPlanfor versioned schemas. On schema mismatch (dev only), the local store auto-deletes and re-syncs from Convex.Voice Input & AI
The user can interact with the Hubble Agent through voice or text. This agent is managed in Convex.
Transcription
Services/SpeechTranscriberManager.swift— Apple Speech transcriptionServices/ParakeetTranscriberManager.swift— Enhanced local transcriptionServices/TranscriptionSettings.swift— User transcription preferencesViews/VoiceNoteView.swift— Main recording flowViews/Components/TranscriptSheet.swift,TranscriptCard.swift— Transcript displayLive Q&A
Services/LiveQAService.swift— Detects questions during transcription to interact with the Hubble agentViews/Components/QABubble.swift— Displays Q&A segments in transcriptServices/TranscriptRefiner.swift— AI-powered transcript cleanup (streaming)ykshev commentedon Feb 11, 2026
any updates here? anybody knows how to fix it? this is insane that you have to approve it every 5 minutes. I've tried to add as set of rules, but it didn't work:
what am i doing wrong?
dasebasto commentedon Feb 12, 2026
I have the same issues with commands like this one:
xcodebuild -workspace ./ProjectName.xcworkspace -scheme ProjectName -configuration Debug -destination 'id=F94783BB-3585-4762-B652-656912287576' build > /tmp/cw_settings_build.log 2>&1;When I instructed Codex to run "pure" xcodebuild commands instead, it seems to have fixed the issue.
The following command was run unsandboxed without approval, as expected:
xcodebuild -workspace ./ProjectName.xcworkspace -scheme ProjectName -configuration Debug -destination 'id=F94783BB-3585-4762-B652-656912287576' buildSo the bug might have something to do with the output redirects.
While troubleshooting, I had also added this to my default.rules, but it did not work:
prefix_rule(pattern=["xcodebuild"], decision="allow")polyrand commentedon Feb 12, 2026
I have this issue in general with most commands. I have a
rulesfile for all the commands I want to auto-approve. If I use--ask-for--aproval=untrusted, it still prompts me to accept the commands, even if my~/.codex/rules/<cmd>.rulesfile allows it.Overall, this issue + my experience makes me think the
rulesand command approvals are not working as expected.polyrand commentedon Feb 12, 2026
To reproduce:
repro.sh:Then codex v0.99 still asks for permissions
I know this is not the same as the issue reported. But I'm sharing this here instead of a new issue because it feels like the root cause is the same
5 remaining items
fix(core) exec_policy parsing fixes (openai#11951)
dylan-hurd-oai commentedon Feb 17, 2026
Re-opening for now to confirm the fix
davidgilbertson commentedon Feb 17, 2026
@dylan-hurd-oai you're great! I cleared all the rules and now it works. Although neither I nor ChatGPT could see any syntax errors.
davidgilbertson commentedon Feb 18, 2026
Actually it's happening again now, asking every time to run tests, and the only thing in my rules file is:
So the current state of things on Windows is quite bad. You can't use the new sandbox because then Codex can't even read files. With the older sandbox, Codex can't run tests in a sandbox because of the EPERM issue. It can escalate and run them outside a sandbox, but it can't remember that it's allowed to run tests. So in a session where its troubleshooting failing tests, you have to sit there and approve it again and again.
fix(core) exec_policy parsing fixes (openai#11951)
feat: switch kontext integration to direct injected tool runtime (#4)
fix(core) exec_policy parsing fixes (openai#11951)
GitMurf commentedon Mar 16, 2026
Yeah it seems that the prefix rules require exact full commands with PowerShell commands for Windows sandboxing. I described my similar issue I am still having here: #8537 (comment)
ILYA-2606 commentedon Mar 25, 2026
A solution has been found:
prefix_rule(pattern=["sh", "xcodebuild.sh"], decision="allow")ax-openai commentedon Jun 12, 2026
Closing as resolved by #11951.
fix(core) exec_policy parsing fixes (openai#11951)