Skip to content

[Bug]: DeepSeek Harness ACP probe caches a partial model catalog during startup #44116

Backlog

Description

@kaaariyaaa

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

Steps to reproduce

  1. Configure a local ACP provider using dsh --profile acp. Configure OpenCode Go or CommandCode GOAT in the Harness ACP profile so its models appear in a normal ACP session.

  2. Refresh the provider in T3 Code 0.1.13. Inspect the model picker or the orchestrator model catalog.

  3. To isolate the behavior, launch the same Harness with dsh --profile acp --patch /path/to/probe.json. Use an unused, writable temporary path in this overlay, equivalent to the history isolation used by the T3 Code probe:

    [
      {"id":"session-persistence-jsonl","config":{"root":"/tmp/dsh-probe-example/sessions"}},
      {"id":"session-projection-cache","disabled":true}
    ]
  4. Over ACP stdio, send initialize with protocolVersion: 1, then immediately send session/new with an absolute project cwd and mcpServers: []. Inspect the model choices in result.configOptions. Wait three seconds and send the same session/new request with a fresh JSON-RPC ID in the same process.

Expected behavior

After provider discovery, the picker and orchestrator catalog include the models that the configured ACP profile can use, including ones whose catalog becomes available shortly after startup.

Actual behavior

In the observed environment, the initial isolated session returned 11 models (10 Codex and 1 DeepSeek official). A second session in the same process three seconds later returned 149 models, including 31 OpenCode Go and 105 CommandCode GOAT models. Normal startup without the overlay returned 149 on the initial request. Changing just the persistence root reproduced the partial list. Disabling just the projection cache did not.

The T3 Code provider cache matched the 11-model initial list. The orchestrator rejected attempts to target the missing model before starting a turn. The probe appears to accept the first nonempty catalog even when the Harness is still loading other providers. The exact readiness mechanism inside the Harness is unconfirmed.

Impact

Major degradation or frequent failure

Version or commit

T3 Code desktop 0.1.13

Environment

Linux x86_64, DeepSeek Harness 0.2.2-rc.5, local ACP command, OpenCode Go and CommandCode GOAT configured in the ACP profile.

Logs or stack traces

AcpRegistryProbe.probeConfiguration: Success
OrchestratorMcpFailure: Model deepseek-v4.1-flash is not advertised by provider acpRegistry_deepseek_harness.

The full ACP model ID ["opencode-go","deepseek-v4.1-flash"] was present in the direct Harness response after the catalog loaded and absent from the T3 Code probe cache.

Workaround

Launching the same Harness through a different executable basename avoids the dsh-specific probe overlay in 0.1.13. A direct ACP test through that alias returned all models. This can leave probe sessions in normal Harness history, and end-to-end verification in T3 Code is pending.

Activity

  1. NewbieXvwu commented on Nov 30, 2026

    @NewbieXvwu

    Same here on macOS (Apple silicon), T3 Code desktop 0.1.14-nightly.20261129.5425, DeepSeek Harness 0.2.2-rc.5, dsh --profile acp. opencode-go/deepseek-v4.1-flash dropped out of the picker mid-session, and delegating to it failed with:

    OrchestratorMcpFailure: Model ["opencode-go","deepseek-v4.1-flash"] is not advertised by provider deepseek_harness. Advertised models: ["deepseek-official","deepseek-v4-flash"].
    

    I traced the Harness side, which this issue lists as unconfirmed. Details and a repro are in deepseek-ai/deepseek-harness#14600. In short:

    1. The Harness credentials service attaches only after it has read $DSH_HOME/.credentials.yaml.
    2. Before that, a pi-ai route whose apiKeyEnv key is stored there (not exported) resolves no key and lists no models.
    3. The ACP bridge then answers session/new with a model select whose only option is the current model, and it never sends a config_option_update once credentials become ready. Only llm/adapters-updated triggers one.

    That is why changing only the persistence root reproduces it: with an empty session store, the Harness starts fast enough that session/new always beats the credentials load. With an isolated store and a minimal one-route config, I see it in 4 of 4 serial runs. With the default store, it depends on load.

    What happens on the T3 Code side

    • The probe gets a single-option select. acpRegistryAdvertisesModelCatalog is false, so it waits up to MODEL_ADVERTISEMENT_GRACE (5 s) for a config_option_update (probe.ts:659-683). None arrives.
    • Because the single model came from an explicit select, modelsFromModelSelect is true. authoritativeProbe then replaces lastAcceptedCatalog with that one model (driver.ts:1046-1061).
    • applyAcpRegistryLiveConfiguration follows the same rule (driver.ts:353-363): "A single model enumerated by an explicit select is not that fallback but the agent's deliberate statement." The Harness's cold-start fallback breaks that assumption, because it is an explicit select.

    Fix and verification

    The root fix belongs in the Harness. A dozen-line Harness plugin that emits llm/adapters-updated when the credentials service attaches is enough for the probe to recover. The Harness then sends the full catalog about 0.2 s after session/new, well inside the 5 s grace. In 6 of 6 parallel runs with my config, the update carried all 13 models; without the plugin, 6 of 6 runs got one model and no update. The plugin is in the discussion linked above.

    As defense in depth on the T3 side, it may be worth treating a select whose only option equals its currentValue as provisional, the same as the non-select case, when a multi-model catalog was accepted before. At least, it should not overwrite lastAcceptedCatalog until a later probe or a live session confirms it. That would keep a slow agent start from wiping a known-good catalog.

    Workaround

    Without the plugin, mirror the key into $DSH_HOME/.env. The Harness's pre-credentials fallback reads the launch environment, which includes that file. Once the credentials service attaches, the stored value still takes precedence. After adding it, toggle the provider off and on so T3 Code probes again. This has been confirmed end to end in T3 Code.

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

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