Skip to content

CLI-backed helper paths still bypass CLI dispatch on latest main #57326

Description

@nicko-ai

Summary

Latest main already contains the original CLI backend ownership / isCliProvider() fix that prompted this issue.

What is still broken on latest main is a smaller remaining surface: some helper paths still bypass runCliAgent() for CLI-backed models and go through the embedded/API path instead.

Affected helper paths:

  • queued followup runs
  • openclaw models status --probe
  • LLM slug generation
  • cron runs where the configured runtime maps a canonical provider, such as anthropic or openai, to a CLI backend

Repro

  1. Configure a CLI-backed default model such as claude-cli/claude-opus-4-6.
  2. Ensure the CLI backend is installed and logged in.
  3. On latest main, trigger one of:
    • a queued followup run
    • openclaw models status --probe
    • a path that uses LLM slug generation with the CLI-backed default model
    • a cron agent run configured through a canonical provider that resolves to a CLI runtime

Actual

These helper paths can still bypass the CLI backend and run through the embedded/API helper path instead, or check CLI-ness before resolving the configured CLI runtime.

Expected

Helper paths should use the same CLI dispatch decision as the main agent runner and preserve the active runtime config, auth, session, and routing context.

Diagnosis

  • src/auto-reply/reply/followup-runner.ts still had a direct embedded-runner path for queued followups.
  • src/commands/models/list.probe.ts still had a direct embedded-runner path for auth probes.
  • src/hooks/llm-slug-generator.ts still had a direct embedded-runner path for slug generation.
  • Cron execution could check CLI provider status before resolving the configured runtime for a canonical provider.

Proposed fix

  • detect CLI-backed providers in those helper paths
  • resolve configured CLI runtimes before checking CLI provider status
  • route CLI-backed helper runs through runCliAgent()
  • preserve latest-main helper behavior that already landed independently
  • add focused regression coverage for followups, probes, slug generation, and cron runtime selection

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions