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
Summary
isCliProvider()has hardcoded checks for"claude-cli"and"codex-cli"that are redundant with theCLI_RUNTIME_NAMESset. After #2108 lands (runtimeId as canonical), all callers pass bare runtime names. The-clispecial cases are dead paths.What to Change
src/agents/provider-utils.ts:79-82— Removeif (normalized === "claude-cli")andif (normalized === "codex-cli")branches fromisCliProvider()CLI_RUNTIME_NAMEScontains all four runtimes:claude,gemini,codex,opencodesrc/agents/cli-session.ts:16,34— Remove"claude-cli"special-case branches ingetCliSessionId()andsetCliSessionId()src/commands/agent.ts:285— RemoveproviderOverride === "claude-cli"string literal checksrc/agents/provider-utils.test.ts— Remove-clitest cases, add bare-name-only coverageAcceptance Criteria
Given
isCliProvider("claude")is calledWhen the function executes
Then it returns
true(via CLI_RUNTIME_NAMES)Given
isCliProvider("claude-cli")is calledWhen the function executes
Then it returns
false(no hardcoded special case, not in CLI_RUNTIME_NAMES)pnpm checkpassesExisting tests pass (or updated)
Depends On