Repository navigation
Description
Summary
Remove all Claude Code subscription-based mode code from the CLI. This is a pure cleanup/refactoring task - no backward compatibility needed, no deprecation comments, just delete everything related to the claude_code config, the infer claude-code command, the Claude Code CLI client adapter, the static model service, and all the branching logic that checks IsClaudeCodeMode() throughout the codebase.
The Claude Code subscription mode (Claude Max/Pro) was an alternative to the gateway-based API mode. It shelled out to the claude CLI, parsed its JSONL stream output, and mapped it onto the SDK's SSE event model. It was complex, fragile, and poorly maintained. The gateway mode is the only supported path going forward.
Changes
Files to delete (5 files, ~1400 lines)
cmd/claude_code.go- Theinfer claude-codecommand withsetupandtestsubcommandsinternal/infra/adapters/claude_code_client.go- The 896-lineClaudeCodeClientadapter (spawnsclaudeCLI, parses JSONL stream, transforms events)internal/infra/adapters/claude_code_client_test.go- Tests for the aboveinternal/services/model_claude_code.go- TheClaudeCodeModelServicewith a static model listinternal/services/model_claude_code_test.go- Tests for the above
Test data to delete (2 files)
internal/infra/adapters/testdata/stream_events.jsonl- Claude Code stream event fixturesinternal/infra/adapters/testdata/todos_write.jsonl- Claude Code TodoWrite fixtures
Config to remove
config/config.go- RemoveClaudeCodeConfigstruct,ClaudeCodefield fromConfig,IsClaudeCodeMode()method, and the~/.claudesandbox carve-out inisPathRestricted()config/prompts.go- RemoveSystemPromptClaudeCodefield fromPromptsAgentConfig
Command wiring to remove
cmd/root.go- Remove--claude-code-extra-argspersistent flag and theclaude_code.extra_argsenv var handling ininitConfig()cmd/config.go- RemoveINFER_PROMPTS_AGENT_SYSTEM_PROMPT_CLAUDE_CODEenv var binding
Container wiring to simplify
internal/container/container.go- Remove theIsClaudeCodeMode()branch ininitializeDomainServices()(always useHTTPModelService), and remove theIsClaudeCodeMode()branch increateAgentSDKClient()(always useSDKClientAdapter)
Agent service to simplify
internal/agent/agent_utils.go- RemoveIsClaudeCodeMode()branches inBuildSystemPrompt(),addSystemPrompt(), andinjectDueReminders()internal/agent/agent.go- Remove theToolCallResultProvidertype assertion inRun()(lines 460-462)
Headless agent session to simplify
cmd/agent.go- Remove:claudeTaskstruct and all related fields/methods (feedTaskAccumulator,applyTaskUpdate,isClaudeTaskTool,renderTodoWriteView,claudeToolResultMessages)IsClaudeCodeMode()checks inprocessSyncResponse()andoutputMessage()CanonicalClaudeModelID()calls inRunAgentCommand()injectDueReminders()skip for Claude Code mode
UI to simplify
internal/ui/components/model_selection_view.go- Remove the "Claude Subscription" badge inviewContent()and theisModelSubscription()override for Claude Code modeinternal/ui/components/model_selection_view_test.go- RemoveTestModelSelector_ClaudeCodeModeCategorizesAsSubscription
Plugin instructions to simplify
internal/services/plugins/instructions.go- RemoveClaudeCodeAppend()functioninternal/services/plugins/instructions_test.go- RemoveTestClaudeCodeAppend
Domain interfaces to simplify
internal/domain/interfaces.go- RemoveToolCallResulttype,ToolCallResultProviderinterface, andToolResultsfield fromChatSyncResponse(only used by Claude Code)
Tests to remove/update
internal/agent/agent_test.go- RemoveTestAgentServiceImpl_AddSystemPrompt_ClaudeCodeModePassthroughcmd/agent_test.go- RemoveTestInjectDueReminders_SkippedInClaudeCodeModeand the Claude Code mode test casesinternal/services/pricing_service_test.go- RemoveTestPricingService_ClaudeCodeModelDefaults
Downstream impact
inference-gateway/docs- The configuration reference page documentsclaude_code.*settings and theinfer claude-codecommand. These should be removed from the docs.inference-gateway/schemas- No impact (the SDK client adapter remains, only the Claude Code-specific adapter is removed).
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsDone
Activity
[-]refactor: remove Claude Code subscription mode (claude_code config, CLI command, adapter, model service)[/-][+][TASK] remove Claude Code subscription mode (claude_code config, CLI command, adapter, model service)[/+][-][TASK] remove Claude Code subscription mode (claude_code config, CLI command, adapter, model service)[/-][+][TASK] Remove Claude Code subscription mode (claude_code config, CLI command, adapter, model service)[/+]inference-gateway-maintainer commentedon Jul 9, 2026
Downstream impact: infer-action
This change also has a downstream impact on inference-gateway/infer-action - the features being removed here (Claude Code subscription mode:
claude_codeconfig,infer claude-codecommand, the Claude Code CLI client adapter, and the static model service) should also be removed frominfer-actionif they are referenced or wired there.Please open a tracking issue on
inference-gateway/infer-actionto remove any Claude Code subscription mode references from that repo as well.edenreich commentedon Jul 9, 2026
@infer Can you work on this? use /ponytail
inference-gateway-maintainer commentedon Jul 9, 2026
Model:
ollama_cloud/deepseek-v4-flash· View JobTodos
fix: resolve #812
refactor: remove Claude Code subscription mode (#813)
docs: remove Claude Code subscription mode documentation
docs: remove Claude Code subscription mode documentation (#374)
chore(release): 🔖 0.9.0 [skip ci]
inference-gateway-releaser commentedon Jul 10, 2026
🎉 This issue has been resolved in version 0.141.0 🎉
The release is available on:
Your semantic-release bot 📦🚀