fix: prevent codex spawn error when codex CLI is not installed

Return success with empty servers array from the config read endpoint
when no config file exists, so the frontend doesn't fall through to
the CLI list endpoint which attempts to spawn the codex binary.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Tim Smith
2026-01-24 11:21:43 -08:00
parent 38745bdf85
commit dab089b29f

View File

@@ -262,7 +262,7 @@ router.get('/mcp/config/read', async (req, res) => {
}
if (!configData) {
return res.json({ success: false, message: 'No Codex configuration file found', servers: [] });
return res.json({ success: true, servers: [] });
}
const servers = [];