macOS camera access fails in Codex app terminal but works in Terminal.app
What version of the Codex App are you using (From “About Codex” dialog)?
Version 26.406.31014 (1395)
What subscription do you have?
ChatGPT Plus
What platform is your computer?
Darwin 24.6.0 arm64 arm
What issue are you seeing?
On macOS Sequoia 15.6.1, camera access works in a normal Terminal session, but fails inside the Codex app's built-in terminal.
In a normal macOS terminal (zsh), this works and shows live video correctly:
ffplay -f avfoundation -framerate 30 -video_size 1280x720 -i "0"
but inside the Codex app terminal, OpenCV fails to open the same camera device. The output is:
OpenCV version: 4.12.0
OpenCV: not authorized to capture video (status 0), requesting...
OpenCV: camera failed to properly initialize!
[ WARN:0@0.146] global cap.cpp:480 open VIDEOIO(AVFOUNDATION): backend is generally available but can't be used to capture by index
isOpened: False
Failed to open camera
The app can appear to invoke the camera path, and macOS may show the green camera indicator in the menu bar, but the preview is black and camera access from the built-in terminal is not actually authorized.
<img width="592" height="602" alt="Image" src="https://github.com/user-attachments/assets/f8026045-38d0-44fc-b95b-b4fd03298158" />
What steps can reproduce the bug?
- Use Codex app on macOS Sequoia 15.6.1.
- Open the built-in terminal in the Codex app.
- Run Python + OpenCV with AVFoundation, for example:
python3 - <<'PY'
import cv2
import sys
print("OpenCV version:", cv2.__version__)
cap = cv2.VideoCapture(0, cv2.CAP_AVFOUNDATION)
print("isOpened:", cap.isOpened())
if not cap.isOpened():
print("Failed to open camera")
sys.exit(1)
ret, frame = cap.read()
print("first read ret:", ret)
if ret:
print("frame shape:", frame.shape)
while True:
ret, frame = cap.read()
if not ret:
print("read failed")
break
cv2.imshow("codex-opencv-camera-test", frame)
key = cv2.waitKey(1) & 0xFF
if key in (27, ord('q')):
break
cap.release()
cv2.destroyAllWindows()
PY
- Observe that camera access fails with not authorized to capture video.
- Compare with the same machine in normal Terminal, where ffplay -f avfoundation ... works correctly.
What is the expected behavior?
Camera access initiated from the Codex app terminal should follow the normal macOS camera authorization flow and work the same way as it does in a regular Terminal session.
If the app declares camera usage and the terminal inside the app can run local processes, then AVFoundation / OpenCV / ffmpeg-based camera access should either:
• prompt for camera permission correctly, or
• already work if permission has been granted.
Additional information
Environment:
• macOS Sequoia 15.6.1
• Codex App: Version 26.406.31014 (1395)
What I verified:
- The app bundle has NSCameraUsageDescription:
APP="/Applications/Codex.app"
defaults read "$APP/Contents/Info" NSCameraUsageDescription
output is "This app needs access to the camera"
- Codex does not appear under:
• System Settings > Privacy & Security > Camera
- TCC database has no camera authorization entry for com.openai.codex:
sqlite3 ~/Library/Application\ Support/com.apple.TCC/TCC.db \
"select service,client,auth_value,last_modified from access where client='com.openai.codex' and service='kTCCServiceCamera';"
This returns no rows.
- TCC does contain other entries for com.openai.codex, so the bundle is recognized by TCC. Example services present included:
• kTCCServiceMediaLibrary
• kTCCServiceAppleEvents
• kTCCServiceFileProviderDomain
• kTCCServiceSystemPolicyDocumentsFolder
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗