Invalid agent role TOML silently breaks entire app — no UI error shown
Summary
If an agent role .toml file in ~/.codex/agents/ is missing required fields (name, description), the entire config/read and mcpServerStatus/list pipeline fails in a tight retry loop. The app appears to load (sidebar, threads visible) but is completely non-functional — cannot start new threads, switch models, change modes, or resume conversations.
Version
- Codex Desktop 26.309.31024
- macOS 15.6 (arm64)
Steps to reproduce
- Create
~/.codex/agents/my-agent.tomlwith valid content but omit thenameordescriptionfields:
``toml``
model_reasoning_effort = "high"
sandbox_mode = "read-only"
developer_instructions = """You are an agent..."""
- Launch Codex Desktop
- App loads but every action fails silently in the UI
Expected behavior
- Codex should either skip invalid agent configs with a visible warning, or show a clear error in the UI pointing to the bad file
- The app should remain functional even if one agent config is invalid (graceful degradation)
Actual behavior
config/readandmcpServerStatus/listboth fail on every call with:
``name
agent role file at ~/.codex/agents/core-architecture.toml must define a non-empty ``
- After adding
name, a second required field surfaces:
``Core Architecture
agent role must define a description``
- The errors repeat every ~2-4 seconds in a retry loop (50+ repetitions observed in logs)
- No error is surfaced in the UI — the app just appears broken/spinning
- Reinstalling the app does not help since
~/.codex/agents/persists - Rebooting does not help
Root cause
The agent .toml validation failure in codex_app_server propagates to block ALL config reads, not just agent-related ones, making the entire app unusable.
Additional context
- The agent files were created during a Symphony setup session. The upgrade that broke things likely introduced stricter validation for the
.tomlschema without migrating existing files. - The workaround is to add
nameanddescriptionfields to every.tomlin~/.codex/agents/, or delete the files. - Relevant log file:
~/Library/Logs/com.openai.codex/— errors inelectron-message-handler
Suggestion
- Show a clear error banner in the UI when agent config validation fails, naming the offending file and missing field
- Gracefully skip invalid agent configs instead of blocking the entire config pipeline
- Consider auto-migrating old
.tomlfiles when new required fields are added
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗