Skip to content

Wire up ignored --max-retries CLI flag to LLM retry logic #28

Description

@devfire

⚙️ --max-retries CLI FLAG IS IGNORED

Location: src/cli.rs:130 (field), src/processor.rs:71-81 (only retry site)

Problem

The CLI exposes --max-retries (default 3, validated ≤ 10), but the retry site hardcodes the count:

let llm_call_result = Retry::spawn(
    ExponentialBackoff::from_millis(100)
        .max_delay(Duration::from_secs(10))
        .take(5),                          // hardcoded — ignores args.max_retries
    || async { ... },
)
.await;

args.max_retries is never consumed outside validate() and the test fixtures.

Issues

  • Configuring --max-retries has no effect — misleading UX.
  • The hardcoded 5 silently disagrees with the documented/validated default of 3.

Suggested Fix

Thread the configured value into the retry strategy:

.take(args.max_retries.max(1) as usize)

Priority: Medium — dead config + silent disagreement between docs, validation, and runtime behavior.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions