Problem
Currently, GitHub Action has to rely on fragile string matching to detect specific error conditions from Gemini CLI output (see #205, #206). This approach is brittle and breaks when error messages change - #206 (comment).
Solution
Use exit codes once they're available in Gemini CLI - google-gemini/gemini-cli#6745.
Example usage of error codes:
| Exit Code |
Error Type |
Action Annotation |
Retry? |
Cleanup Action |
| 0 |
Success |
None |
No |
Continue workflow |
| 2 |
Auth Failure |
::error |
No |
Post auth help comment |
| 3 |
Rate Limit |
::warning |
Yes (3x) |
Wait with backoff |
| 4 |
Session Limit |
::error |
No |
Post session limit comment |
| 5 |
Network Issues |
::warning |
Yes (2x) |
Retry with delay |
| 6 |
Config Error |
::error |
No |
Post config help comment |
| 7 |
Permission Denied |
::error |
No |
Post permission help comment |
| Other |
General Failure |
::error |
No |
Post generic error comment |
Problem
Currently, GitHub Action has to rely on fragile string matching to detect specific error conditions from Gemini CLI output (see #205, #206). This approach is brittle and breaks when error messages change - #206 (comment).
Solution
Use exit codes once they're available in Gemini CLI - google-gemini/gemini-cli#6745.
Example usage of error codes:
::error::warning::error::warning::error::error::error