You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Remote delegate_task ignores target.driverKind and runs the requested model on the caller's provider instance #34778
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
Have two linked environments, A and B. Both have a Claude provider instance (claudeAgent) and a Codex provider instance (codex).
In a Claude thread on A, call delegate_task aimed at B, naming the provider by driver kind only:
{
"task": "Reply with the single word: ok. Do not run any tools.",
"target": {
"environmentId": "<B>",
"projectId": "<a project on B>",
"driverKind": "codex",
"model": "gpt-6.1-sol",
"options": { "reasoningEffort": "low" }
}
}
Look at providerInstanceId in the tool result, or at the child thread on B.
Repeat with "providerInstanceId": "codex" in place of "driverKind": "codex".
Expected behavior
driverKind: "codex" resolves to B's Codex instance, as it does for a local delegate, or the call is rejected because the model does not belong to the resolved instance.
Actual behavior
The child thread on B is created on the caller's instance, claudeAgent, with the Codex model and Codex options kept:
The stored thread on B has modelSelection: {"instanceId":"claudeAgent","model":"gpt-6.1-sol","options":[{"id":"reasoningEffort","value":"medium"}]}, and the Claude Agent SDK session is opened with model: "gpt-6.1-sol".
Nothing reports the mismatch. With a stock Claude setup the run would presumably fail on an unknown model. Behind an LLM gateway that serves both model families it runs: the GPT model is driven through the Claude Code harness instead of Codex. That is how this was noticed, because Claude Code then warns that auto mode's server-side classifier is unavailable for the session.
The agent that hit this had called orchestrator_capabilities first and passed a provider and model taken from its output, so the call followed the documented usage.
Impact
Major degradation or frequent failure
Version or commit
Caller 0.1.8 → target 0.1.6 (original occurrence, five threads); caller 0.1.6 → another target (minimal repro above)
Environment
macOS on all machines, environments linked over Tailscale HTTPS. Claude Code 2.1.322. Providers: claudeAgent and codex (existing CLI) on both ends.
Logs or stack traces
Provider event log on the target for the child thread:
Activity