From bd82101859fd38a1a6fa085e33bf21ae244063d6 Mon Sep 17 00:00:00 2001 From: Kevin Alwell Date: Wed, 30 Apr 2025 19:00:50 -0400 Subject: [PATCH] fix: insufficient quota message (#758) This pull request includes a change to improve the error message displayed when there is insufficient quota in the `AgentLoop` class. The updated message provides more detailed information and a link for managing or purchasing credits. Error message improvement: * [`codex-cli/src/utils/agent/agent-loop.ts`](diffhunk://#diff-b15957eac2720c3f1f55aa32f172cdd0ac6969caf4e7be87983df747a9f97083L1140-R1140): Updated the error message in the `AgentLoop` class to include the specific error message (if available) and a link to manage or purchase credits. Fixes #751 --- codex-cli/src/utils/agent/agent-loop.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codex-cli/src/utils/agent/agent-loop.ts b/codex-cli/src/utils/agent/agent-loop.ts index 53da6979..20a12e7c 100644 --- a/codex-cli/src/utils/agent/agent-loop.ts +++ b/codex-cli/src/utils/agent/agent-loop.ts @@ -1137,7 +1137,7 @@ export class AgentLoop { content: [ { type: "input_text", - text: "⚠️ Insufficient quota. Please check your billing details and retry.", + text: `\u26a0 Insufficient quota: ${err instanceof Error && err.message ? err.message.trim() : "No remaining quota."} Manage or purchase credits at https://platform.openai.com/account/billing.`, }, ], });