Files
inoisyandEvgeniy Yakutov 828e0c927e MUL-8346: fix(agent): handle Claude Code session and weekly limits (#9652)
* fix(taskfailure): classify Claude Code session and weekly limits as provider quota

Claude Code reports a spent subscription window as "You've hit your session limit · resets 2pm (UTC)" or "You've hit your weekly limit · resets <date>". Neither matched the quota patterns, so these runs were classified as agent_error.unknown and quota-aware handling never saw them.

* fix(agent): stop waiting for claude after an error result

With stdin closed, the Claude Code CLI stays alive while any background task it started is running, then opens a new turn when the task ends. After an error result (a spent session limit, an API failure) that turn cannot change the outcome, yet the daemon kept the run open for the background task's lifetime. Terminate the process group 10s after an error result, the same way cancellation does, so the run fails with the result's error.

---------

Co-authored-by: Evgeniy Yakutov <[email protected]>
2026-10-29 10:47:54 +08:00
..