Skip to content

gut(providers): collapse isCliProvider hardcoded *-cli checks into CLI_RUNTIME_NAMES #2125

@alexey-pelykh

Description

@alexey-pelykh

Summary

isCliProvider() has hardcoded checks for "claude-cli" and "codex-cli" that are redundant with the CLI_RUNTIME_NAMES set. After #2108 lands (runtimeId as canonical), all callers pass bare runtime names. The -cli special cases are dead paths.

What to Change

  • src/agents/provider-utils.ts:79-82 — Remove if (normalized === "claude-cli") and if (normalized === "codex-cli") branches from isCliProvider()
  • Verify CLI_RUNTIME_NAMES contains all four runtimes: claude, gemini, codex, opencode
  • src/agents/cli-session.ts:16,34 — Remove "claude-cli" special-case branches in getCliSessionId() and setCliSessionId()
  • src/commands/agent.ts:285 — Remove providerOverride === "claude-cli" string literal check
  • Update src/agents/provider-utils.test.ts — Remove -cli test cases, add bare-name-only coverage

Acceptance Criteria

  • Given isCliProvider("claude") is called
    When the function executes
    Then it returns true (via CLI_RUNTIME_NAMES)

  • Given isCliProvider("claude-cli") is called
    When the function executes
    Then it returns false (no hardcoded special case, not in CLI_RUNTIME_NAMES)

  • pnpm check passes

  • Existing tests pass (or updated)

Depends On

Metadata

Metadata

Assignees

No one assigned

    Labels

    gutRemoving dead upstream subsystems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions