Skip to content

Kane CLI should block execution immediately when the account has 0 credits #174

Description

@MayurkPatil

Summary

When a user with 0 credits runs kane-cli run with an objective, Kane CLI launches the TUI and attempts to interpret the objective before checking the credit balance. Because the LLM is unavailable at 0 credits, objective parsing fails, and the CLI incorrectly prompts the user for missing information (e.g., the target website) before finally surfacing the insufficient-credits error.

Credit validation should happen up front, so the command fails fast with a clear error and never launches the TUI or performs any LLM-dependent work.

Steps to Reproduce

  1. Ensure the account has 0 credits.
  2. Run:
    kane-cli run "go to amazon.in and search for TV under 25000 INR price constraint. Perform boundary value analysis using expand_bva on the budget threshold of 25000"
    

Actual Behavior

  • Kane CLI launches the TUI and tries to interpret the objective.
  • With 0 credits the LLM is unavailable, so objective parsing fails.
  • The CLI cannot extract details such as amazon.in and prompts the user to provide the website.
  • Only after the user supplies the website does the CLI display the insufficient-credits error.

Expected Behavior

Before launching the TUI or processing the objective, Kane CLI should validate the account's available credits.

If credits = 0, the command should terminate immediately with a clear message, e.g.:

You don't have enough credits to run this command. Please add credits to your account and try again.

At 0 credits, the CLI must not:

  • Launch the TUI
  • Attempt objective interpretation
  • Ask follow-up questions
  • Ask for the website
  • Perform any LLM-dependent processing

Acceptance Criteria

  • Credit balance is validated before objective processing begins.
  • kane-cli run with 0 credits immediately shows an insufficient-credits error.
  • The TUI is not launched when credits are 0.
  • No objective parsing / LLM-dependent processing is attempted.
  • No follow-up questions are presented to the user.
  • Behavior is consistent across all kane-cli run objectives when the account has 0 credits.
  • The error message clearly explains that additional credits are required to proceed.

Suggested labels (could not be applied automatically — no triage access): bug, credit 0 case, error handling.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingexperienceIssues related to user experience

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions