Credits are currently deducted at the initiation of a task. However, if the agent encounters a system-level error (e.g., Rate limit exceeded or Permission denied) before generating a response, the credits are lost while the user receives zero analysis or code.
This results in a "failed transaction" where the user pays for an infrastructure failure.
Proposed Solution: Transactional Billing
Atomic Deductions: Credits should only be permanently deducted if the model successfully provides a response.
Auto-Rollback: If a "Rate Limit" or "Internal Error" is thrown during a file scan or code generation, the credit must be automatically credited back to the user balance.
Validation: The system should check for API availability before triggering the deduction.
Why it Matters
Professional developers rely on credits for complex codebase analysis. When the tool hits a rate limit loop and drains the balance without delivering output, it breaks user trust. "No Output = No Charge" should be the standard policy for a premium tool.