Skip to content

[Bug]: Copilot (ACP) threads run a different model and effort than the composer shows #35172

Closed

Description

@torerik81

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server (packages/provider-acp, packages/provider-acp-registry)

Steps to reproduce

  1. Give Copilot CLI a default model that differs from the model it advertises in ACP session/new, for example "model": "gpt-6.1-sol" in ~/.copilot/settings.json. Copilot's session/new still reports model: claude-sonnet-5.5 and reasoning_effort: medium (ACP session/new reports a model that the session is not running github/copilot-cli#5363).
  2. Use the Copilot provider from the ACP Registry in T3 Code.
  3. Start a new thread. The composer shows Sonnet 5.5 and an effort level (xhigh in my case).
  4. Send a few prompts without touching the model picker.
  5. Check which model ran: the session.usage_record events in ~/.copilot/session-state/<session-id>/events.jsonl carry usage.model and usage.reasoningEffort.

Expected behavior

The thread runs the model and effort that the composer shows.

Actual behavior

The first four turns ran gpt-6.1-sol at medium effort while the composer showed Sonnet 5.5 and xhigh. After I changed the model in the picker, T3 sent session/set_config_option and later turns ran the selected model and effort.

Copilot sends a config_option_update with model: gpt-6.1-sol shortly after the first session/prompt (reproduced with a standalone ACP script), but the composer kept showing Sonnet 5.5 until I changed the model myself.

Three things combine:

  1. setConfigOption in packages/provider-acp/src/server/AcpSessionRuntime.ts returns early when the cached currentValue already matches (configOptionCurrentValueMatches). Because of ACP session/new reports a model that the session is not running github/copilot-cli#5363 that cached value is wrong, so configureSession in packages/provider-acp/src/server/adapter.ts sends nothing for the model.
  2. The thread's stored modelSelection had no options, so T3 sent no reasoning_effort either. The effort in the composer comes from the provider-level live configuration (applyAcpRegistryLiveConfiguration in packages/provider-acp-registry/src/server/driver.ts), which the last Copilot session to report an effort sets. The composer can therefore show an effort that the thread never requests.
  3. When Copilot later reports a different currentValue for model, the thread keeps its selection in the UI and T3 does not apply it again.

Suggested fixes:

  1. On session open, send the thread's model, and its effort when set, with session/set_config_option even when it matches the advertised currentValue, at least for Copilot. ACP session/new reports a model that the session is not running github/copilot-cli#5363 recommends this as the client workaround. In [Bug]: ACP adapter re-sends an unchanged model, which resets Copilot's 1M context tier #27022 a redundant model set kept the long_context tier on Copilot CLI 1.0.109, so this should not reset the 1M context.
  2. Store the effort the composer shows in the thread's modelSelection.options when the thread is created, so session open sends it.
  3. When the agent reports a currentValue that differs from the thread's selection, apply the selection again or show the model the session runs.

Impact

Major degradation or frequent failure

Version or commit

T3 Code desktop 0.1.9. Source references are from main @ d6ac53e.

Environment

Windows x64, T3 Code desktop 0.1.9, GitHub Copilot CLI 1.0.109 through the ACP Registry provider

Logs or stack traces

Request sequence from the thread's provider event log:

initialize
session/new
session/prompt              turn 1, ran gpt-6.1-sol at medium
session/prompt              turn 2, same
session/prompt              turn 3, same
session/prompt              turn 4, same
session/set_config_option   after a manual model change in the picker
session/set_config_option

Copilot CLI log at session start:

model_resolution_info: config_model=gpt-6.1-sol, default_model=claude-sonnet-5.5, resolution_source=config

Workaround

Pass the model and effort as launch flags in the Copilot provider's command args, for example ["--acp", "--model", "claude-opus-5.5", "--reasoning-effort", "xhigh"]. With these flags session/new reports the model and effort the session runs, so the existing check in setConfigOption works. Setting model in ~/.copilot/settings.json to the model Copilot advertises also works, but it changes the default of the interactive CLI too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions