Skip to content

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented Jul 1, 2025

Closes #316

Applied changes based on Issue #316.

I’ve hardened the JSON parsing in the Codex CLI integration by:

• Wrapping the JSON.parse(lastLine) in its own try/catch to log the exact parse error and include the offending line.
• Throwing a clear “Failed to parse JSON output from Codex” error on parse failure.
• Adjusting the outer catch to detect and immediately rethrow these parse errors, so they surface clearly instead of being lumped under “Failed to execute Codex command.”

This ensures that malformed or unexpected JSON from the Codex output is handled explicitly and provides clearer diagnostics. Let me know if you’d like any additional tweaks!

@github-actions github-actions bot mentioned this pull request Jul 1, 2025
@YiweiShen YiweiShen merged commit 8224557 into main Jul 1, 2025
@YiweiShen YiweiShen deleted the codez-fix-316-codex-harden-json-parsing-3025450005 branch July 1, 2025 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Harden JSON parsing

1 participant