Skip to content

Allow launchers to skip initial Claude setModel#646

Open
imwalkinhere wants to merge 1 commit into
agentclientprotocol:mainfrom
imwalkinhere:foreman-skip-baked-model-setmodel
Open

Allow launchers to skip initial Claude setModel#646
imwalkinhere wants to merge 1 commit into
agentclientprotocol:mainfrom
imwalkinhere:foreman-skip-baked-model-setmodel

Conversation

@imwalkinhere
Copy link
Copy Markdown

Summary

  • add a launcher-controlled escape hatch for the initial query.setModel(...) call when the model is already baked into the Claude subprocess environment
  • treat both CLAUDE_AGENT_ACP_SKIP_INITIAL_SET_MODEL=1 and the existing OpenClaw-facing CLAUDE_ACP_BAKE_MODEL=1 marker as signals to skip the redundant setModel call
  • cover the behavior with a settings test that selects the current model from ANTHROPIC_MODEL without calling setModel

Context

Some ACP launchers select the Claude model before process startup via environment variables. In that mode, immediately replaying setModel after initialization can hit provider/runtime paths that are more fragile than launch-time model selection. This keeps the default behavior unchanged unless a launcher explicitly opts into the skip marker.

Tests

  • npm run test:run -- src/tests/acp-agent-settings.test.ts
  • npm run build
  • npm run format:check
  • npm run lint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant