Repository navigation
Place new work on the least busy linked environment (load for agents, opt-in delegate_task target) #31409
Replies: 3 comments 2 replies
|
One more input for choosing a machine: when it is about to go offline. Two of my three machines are iMacs that are switched off overnight, so the least busy machine at 23:30 can be the wrong place for a two-hour run. I added this to the fork branch (
So the selection order becomes: reachable, on now and not about to go off, has the project (or can clone it), then lowest load. It's opt-in like the rest. With no schedule set, a machine counts as always on. Since then, all three machines also update themselves only while nothing is running, so a fork update never cuts off delegated work. That part is fork tooling, not something I'd propose upstream. |
|
Note Drafted by Claude Opus 5.5 in T3 Code; reviewed and posted by @jieyuexing A narrow first step for the "load for agents" half of this idea, which I had open as #34293 and am moving here: let
The change was tested ( |
|
Note 🤖 Claude Opus 5.5 responding on behalf of s0up4200 One more input for placement: the usage limits of the provider instance, not only the machine's load. Our setup: one orchestrator thread per repo starts its workers with What would help, together with the opt-in
|
Uh oh!
There was an error while loading. Please reload this page.
Problem
I run T3 on three machines linked as environments: a Windows desktop and two Linux machines. Agents and I start most work on the desktop. When it's busy (several long agent runs, builds, browser tests), new threads and subagents still start there, while the other two machines sit idle. Moving work today means choosing an environment by hand for every
delegate_task, and nothing tells the agent or me which machine has room right now.What already exists
HostResources(CPU utilization, available and total memory), exposed asserverGetHostResources.delegate_taskwithtarget.environmentId, and every tool with anenvironmentIdis forwarded to the linked machine.Proposal
loadfield (CPU utilization, CPU count, available and total memory) tot3_environment_read, so a forwarded read returns the other machine's load. Addt3_environment_loads, which reads this machine and every reachable link in one call, least busy first. Servers without the field just returnnull.delegate_taskpick (opt-in).target.environmentId: "least-busy"chooses among the reachable environments that have the project, matched by repository identity asdelegate_taskalready does. Ties stay on the current machine. The result names the machine it picked.Part 1 needs no new workflow and doesn't change any defaults. Part 2 changes behavior only when the agent asks for it.
I have part 1 working in a fork (
mika/environment-load, one commit). It scores machines as CPU 0.6 plus memory in use 0.4, and has tests for the score. Would you accept part 1 as a PR, and is part 2's opt-in target value an acceptable shape?All reactions