GitHub Action exits 0 when an automatic command fails
Observed
The GitHub Action exits 0 even when every automatic command failed. handle_request (pr_agent/agent/pr_agent.py:327) catches every exception, logs "Failed to process the command." and returns False; github_action_runner.py awaits it at lines 129, 266, 349 and 355 and never reads the boolean; the entrypoint is asyncio.run(_run_action_and_drain()), whose result is discarded. A repository running pr-agent as an Action gets a green job when /review, /describe or /improve produced nothing (model error, provider 4xx, bad settings), with the job log as the only trace.
Reproduction
From @crestonepeaks on #2951: a synchronize event with push_commands = ["/review"], a stub agent whose handle_request returns False without raising; the handler returns normally and the job succeeds. Verified on main b9118586 by reading the four call sites and the entrypoint.
Proposed fix
Collect the boolean from every awaited handle_request, keep running the remaining commands, and exit non-zero after the loop if any returned False (return the status from run_action and raise SystemExit in __main__). One unit test with a stub PRAgent returning False, asserting the non-zero exit. propagate_tool_errors stays as it is.
Scope
Only the exit status. Whether later commands stop after a failure is #2952's opt-in policy and stays separate.
Source: The-PR-Agent/pr-agent