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
Improve missing API key error: avoid ENOENT on missing server info JSON #70
When openai/codex-action@v1 runs without an openai-api-key value, it fails with a low-signal ENOENT error about a missing server info JSON file.
Actual behavior
The action fails at read-server-info with:
Error reading server info: Error: ENOENT: no such file or directory, open '/home/runner/.codex/<run_id>.json'
Error: Failed to read server info from /home/runner/.codex/<run_id>.json
In this case, the root problem was that secrets.OPENAI_API_KEY was not set in the repo.
Expected behavior
A clear failure message like:
openai-api-key input is empty (did you forget to set OPENAI_API_KEY secret?)
instead of a downstream file-not-found error.
Why this is confusing
ENOENT on an internal .codex/<run_id>.json file reads like a runtime crash, not a missing input. It makes debugging much harder than necessary.
Suggested fix
Either:
Add an explicit preflight validation for missing openai-api-key when required, or
Guard read-server-info so it cannot run unless proxy startup/server-info creation was attempted.
Reacted by topherbuckley, Christopher Wiles, Qiu Yuanhui, Zhe, Tony and Leonardo Lemos
I'd like to take this. When the Responses API proxy was never started, read-server-info now fails immediately with a message naming the openai-api-key input, instead of polling the missing file for about 10 seconds. Other read errors keep the retry loop. Tests included.
Activity
burgulvedant commentedon Oct 31, 2026
I'd like to take this. When the Responses API proxy was never started, read-server-info now fails immediately with a message naming the openai-api-key input, instead of polling the missing file for about 10 seconds. Other read errors keep the retry loop. Tests included.