# how does bernstein pick tasks for agents

Canonical URL: https://bernstein.run/q/how-does-bernstein-pick-tasks-for-agents
Markdown URL: https://bernstein.run/q/how-does-bernstein-pick-tasks-for-agents.md
Tags: scheduler, routing

the scheduler reads .sdd/backlog/open/ each tick, filters out tasks whose dependencies are not yet satisfied, applies a fair-priority ordering (critical -> high -> medium -> low, with starvation guards), and emits the next ready task. the router then chooses the model and the cli agent: with --routing bandit, a contextual linucb bandit over a feature vector (role, complexity, file scope, historical outcomes). bernstein trace <task-id> prints the step-by-step decision trail for a task, including which agent and model it landed on. source: src/bernstein/core/orchestration/ and src/bernstein/core/routing/.

## Related

- https://bernstein.run/q/how-does-bernstein-work
- https://bernstein.run/q/what-models-does-bernstein-use
