Invalid agent role TOML silently breaks entire app — no UI error shown

Open 💬 1 comment Opened Mar 12, 2026 by Pavel-Sennikov

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

  1. Create ~/.codex/agents/my-agent.toml with valid content but omit the name or description fields:

``toml
model_reasoning_effort = "high"
sandbox_mode = "read-only"
developer_instructions = """You are an agent..."""
``

  1. Launch Codex Desktop
  2. 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/read and mcpServerStatus/list both fail on every call with:

``
agent role file at ~/.codex/agents/core-architecture.toml must define a non-empty
name
``

  • After adding name, a second required field surfaces:

``
agent role
Core Architecture 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 .toml schema without migrating existing files.
  • The workaround is to add name and description fields to every .toml in ~/.codex/agents/, or delete the files.
  • Relevant log file: ~/Library/Logs/com.openai.codex/ — errors in electron-message-handler

Suggestion

  1. Show a clear error banner in the UI when agent config validation fails, naming the offending file and missing field
  2. Gracefully skip invalid agent configs instead of blocking the entire config pipeline
  3. Consider auto-migrating old .toml files when new required fields are added

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗