{"repo":"NousResearch/hermes-agent","public_id":"49769","display_label":"Handling 402 'can only afford N tokens' errors as recoverable","summary":"Most members concern a 402 response saying only N tokens are affordable, which is described as being treated as terminal billing; two titles propose treating it as recoverable or retrying once with a capped output. One member is a broader test-focused item on provider wire formats, error bodies, and prompt-cache prefixes, which is related but less specific.","subsystem":"agent","counts":{"members":4,"open_issues":0,"open_issues_distinct":0,"open_prs":0,"closed_issues":1,"merged_prs":2,"attempt_prs":1},"landed_fix":{"status":"merged_to_main","basis":"structural","pr":134157,"merged_at":"2026-10-07T01:11:08+00:00"},"resolution":{"state":"resolved","by":"pr-133714"},"freshness":{"state":"verified","last_verified_at":"2026-10-07T01:11:08+00:00","is_stale":false},"grouping":{"backbone":"STRUCTURAL_SPANNING","link_density":0.5},"fix_edges":[{"issue_number":49769,"pr_number":133767,"tier":"verified","basis":"closing_ref","confidence":0.95,"recoverable_from_timeline":true,"pr_merged_at":"2026-10-06T19:29:52+00:00"},{"issue_number":49769,"pr_number":134157,"tier":"verified","basis":"closing_ref","confidence":0.95,"recoverable_from_timeline":true,"pr_merged_at":"2026-10-07T01:11:08+00:00"}],"members":[{"kind":"issue","number":49769,"title":"Recoverable 402 (\"can only afford N tokens\") is treated as terminal billing and drops the request","url":null,"state":"closed"},{"kind":"pr","number":49785,"title":"fix(error): treat 402 'can only afford N tokens' as recoverable rate-limit","url":null,"state":"closed","close_reason":{"refs":[{"kind":"commit","value":"ee8dd6c886","number":0},{"kind":"pr","value":"#134157","number":134157}],"category":"implemented_elsewhere","implication":"superseded"},"merged":false},{"kind":"pr","number":133767,"title":"test: pin each provider's wire, real error bodies, and the prompt-cache prefix contract","url":null,"state":"merged","close_reason":{"category":"merged"},"merged":true,"is_fix_pr":true,"fix_tier":"verified","files_changed":["tests/agent/test_error_classifier_observed.py","tests/agent/test_prompt_cache_prefix_contract.py","tests/agent/transports/test_provider_wire_snapshot.py","tests/fixtures/provider_wire_snapshot.json"]},{"kind":"pr","number":134157,"title":"fix(agent): a credit-limited 402 retries once with the affordable output cap instead of failing as billing","url":null,"state":"merged","close_reason":{"category":"merged"},"merged":true,"is_fix_pr":true,"fix_tier":"verified","files_changed":["agent/turn_recovery.py","agent/turn_retry_state.py","tests/agent/test_affordable_402_main_loop.py"]}],"trust":{"default_tier":"verified","includes_suggested":false}}