Route tasks by engine and capability
Status: Ready
Article ID: 034
Truth label: Current
Audience: Fleet operator
Reader outcome: Keep a task pending until a worker advertises the requested execution engine and every required capability.
Related articles: 009, 035, 041
Target week: 14
Last verified: 2026-09-13
Technical reviewer: Codex source audit
Editorial reviewer: Codex editorial audit
Describe the work before the machine
A task can request an engine and a set of capability tags. The engine names the execution backend, such as Claude Code, Codex, local Codex OSS, Antigravity, or one of the built-in paths. Capabilities describe additional worker properties the work needs.
Keep the two separate. “Has the Codex binary” is an engine fact. “Has Python” or “can reach a named environment” is a capability or fleet policy fact.
Trust worker advertisement narrowly
At registration and heartbeat, a worker reports its installed engines and capabilities, and at registration the version each CLI reports. Central uses those fields to filter pending tasks. A task with a named CLI engine is skipped when the polling worker did not advertise it. A task with required capabilities is skipped unless all are present. A requested reasoning effort the engine does not offer is dropped by the worker rather than passed as a flag the binary would reject.
Built-in agentic and legacy paths are treated differently because they do
not require an advertised CLI binary. Older workers with unknown engine data
retain compatibility behavior, so current fleets should keep registration
metadata fresh.
Let unmatched work wait
If no worker matches, the task stays pending. That is the correct outcome. Central should not silently switch an explicitly requested engine or drop a capability constraint to make the queue move.
Inspect the pending task and worker records side by side:
- exact engine spelling
- required versus advertised capability sets
- worker status and heartbeat
- worker pin
- parent-task status
- literal project-path reachability
The first mismatch explains why routing did not proceed.
Match verification to the worker
Engine eligibility does not prove that the verification command exists on the same host. Use a platform-correct command and environment path. A worker can run the requested agent while still lacking the test runtime named by the task.
For heterogeneous fleets, consider representing important verification prerequisites as capability tags, then prove them during worker provisioning. Do not use a vague capability label as a substitute for an actual smoke test.
Review the claimed task
After claim, confirm that the persisted assigned worker advertised the chosen engine and capabilities. Then inspect run metadata for the engine that actually executed. A correct route plus an unexpected engine in the result is an incident worth investigating.
Current limits
Capabilities are worker-reported labels, not remote attestation. Routing does not translate project paths, install missing dependencies, or verify that a tool remains healthy after registration. A paused or archived project keeps its pending tasks out of polling; it does not stop work already running.
Next lesson
Continue with Pin a task to one worker.
Derivative map
- Weekly package: WEEK-14
- Long video: VIDEO-W14-LONG
- Shorts: SHORT-W14-PROBLEM, SHORT-W14-MECHANISM, SHORT-W14-WARNING
- Email: EMAIL-W14
- LinkedIn: LI-W14-A, LI-W14-B
- X: X-W14-A, X-W14-B
- Visual: VISUAL-W14
Review record
- Engine, built-in backend, capability-set, pending, and routing behavior checked against current source.
- Self-report, path, dependency, health, project-state, and verification limits reviewed.
- Troubleshooting checklist distinguishes routing from host readiness.
- Internal links and repository voice reviewed.
Review completed: 2026-08-27
Re-audited against the running product: 2026-09-13