t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: orchestrator_capabilities keeps canRunChildTask true for a provider after it fails with an exhausted usage balance (402)

Open jamesdchen opened this issue 4 weeks ago • 1 comments

Before submitting

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

Area

apps/server (orchestrator capabilities, delegate_task)

Version

T3 Code (Beta) desktop 0.1.6 on Windows as the parent, delegating to a linked Linux environment.

Steps to reproduce

  1. Have a provider instance whose account has no usage balance left (seen with Grok).
  2. Call orchestrator_capabilities. The provider is reported with canRunChildTask: true and constraints: [].
  3. Choose it and call delegate_task, because it's the available provider.
  4. Call orchestrator_capabilities again after the failure.

Expected behavior

Once a provider has returned a usage or billing failure, capabilities reflect that: for example, a constraint such as "last run failed: usage balance exhausted" with a timestamp, or at least a separate field saying when it last failed. T3 can't know a balance before it calls the provider, but it does know the result of the last call.

Actual behavior

Three delegate_task calls to Grok, accepted with status running, all failed in the same way:

API error (status 402 Payment Required): Grok Build usage balance exhausted

A later orchestrator_capabilities call on that environment, after the failures, still reported Grok with canRunChildTask: true and constraints: []. In the same response, providers that really can't run are reported with canRunChildTask: false and a reason (for example "Claude Code is not authenticated").

Why it matters. Agents are told to pick a provider from this list. Provider-selection rules such as "use any provider with canRunChildTask: true" therefore keep selecting a provider that can't run, and each attempt loses a round of work before the failure appears. Here it cost one round of three coordinators, which had to be restarted on another provider.

jamesdchen avatar Nov 02 '26 23:11 jamesdchen

Thanks for writing this up. It asks for new behaviour rather than reporting a defect, so it does not belong in the bug tracker and I'm closing it as not planned here. Feature ideas are discussed in Discussions: please post it there.

juliusmarminge avatar Nov 20 '26 05:11 juliusmarminge