Task Lifecycle
Tasks flow through six states (fromsrc/yc_bench/db/models/task.py:12):
State Transition Diagram
Market Phase
Tasks start in the market — a pool of 200 available tasks (configurable).Browsing the Market
Market Replenishment (from src/yc_bench/cli/task_commands.py:85)
When you accept a task, the market immediately generates a replacement task with similar prestige:
Market replenishment is deterministic — given the same seed and acceptance sequence, the market evolves identically across runs.
Acceptance (market → planned)
Command
Acceptance Checks (from src/yc_bench/cli/task_commands.py:60)
- Prestige gating: For each domain the task requires, verify
company.prestige[domain] >= task.required_prestige
- Deadline calculation: Based on the heaviest single domain (domains work in parallel)
- Task transition:
status = PLANNED,company_id = your_company,accepted_at = sim_time
Acceptance Output
Assignment (planned/active + employee)
Command
Assignment Rules (from src/yc_bench/cli/task_commands.py:136)
- Task must be in
PLANNEDorACTIVEstatus - Employee must belong to your company
- Cannot assign the same employee twice to the same task
- No limit on employees per task (but throughput splits!)
Assignment Effects
- Record assignment in
task_assignmentstable - Recalculate ETAs if task is already active (employee’s throughput is now split)
Assignment Output
You can assign employees before or after dispatching. Assigning before dispatch allows you to validate team composition before work begins.
Dispatch (planned → active)
Command
Dispatch Rules (from src/yc_bench/cli/task_commands.py:208)
- Task must be in
PLANNEDstatus - Task must have at least one assignment
Dispatch Effects (from src/yc_bench/cli/task_commands.py:239)
- Transition to active:
task.status = ACTIVE - Recalculate ETAs: Schedule
TASK_HALF_PROGRESSandTASK_COMPLETEDevents - Recalculate peer tasks: Other active tasks sharing assigned employees get updated ETAs
Dispatch Output
Once dispatched, work begins immediately. Progress accumulates during the next
sim resume call.Progress Checkpoints (25%, 50%, 75%, 100%)
The agent is woken at progress milestones to observe task advancement.Default Milestones (from default.toml:97)
- 25%: Early checkpoint — verify employees are working
- 50%: Halfway — reassess deadline risk
- 75%: Final checkpoint before completion
- 100%: Task completed (handled separately)
Milestone Event (from src/yc_bench/core/handlers/task_half.py:20)
When a milestone fires:
Observing Progress
Agents can query task progress:Progress milestones provide data points to infer employee productivity. Agents can measure
actual_progress / expected_progress to estimate hidden skill rates.Deadline Calculation
Deadlines are computed at acceptance time based on the heaviest single domain (fromsrc/yc_bench/cli/task_commands.py:30).
Formula
Deadline Parameters (from default.toml:93)
Example
Task requirements:- Research: 3200 units
- Training: 1800 units
3200 (research)
Biz days: max(7, 3200 / 200) = max(7, 16) = 16 days
Work hours: 16 days × 9 hours/day = 144 business hours
Deadline: accepted_at + 144 business hours
Task Completion (100% progress)
When all domain requirements reachcompleted_qty >= required_qty, a TASK_COMPLETED event fires.
Success vs. Failure (from src/yc_bench/core/handlers/task_complete.py:47)
- Success:
completion_time ≤ deadline - Failure:
completion_time > deadline
Success Outcome (from src/yc_bench/core/handlers/task_complete.py:54)
Failure Outcome (from src/yc_bench/core/handlers/task_complete.py:110)
Cancellation
Agents can cancel planned or active tasks, but at a steep cost.Command
Cancellation Rules (from src/yc_bench/cli/task_commands.py:372)
- Task must be in
PLANNEDorACTIVEstatus - Cannot cancel completed tasks
Cancellation Effects (from src/yc_bench/cli/task_commands.py:397)
Cancellation Penalties (from default.toml:74)
- Task reward:
+0.10prestige per domain - Cancel penalty:
-0.20prestige per domain
Success vs. Failure vs. Cancellation Summary
| Outcome | Prestige Change | Funds | Skill Boost | Salary Bump | Notes |
|---|---|---|---|---|---|
| Success | +reward_prestige_delta | +reward_funds_cents | ✅ Yes | ✅ +1% | On-time completion |
| Failure | -1.4× reward_prestige_delta | ❌ None | ❌ None | ❌ None | Late completion |
| Cancellation | -2.0× reward_prestige_delta | ❌ None | ❌ None | ❌ None | Gave up early |
Task Observability
Agents can inspect tasks at any time:List All Tasks
Inspect Task Details
Best Practices
1. Validate Prestige Before Accepting
Checkcompany status to ensure you meet prestige requirements in all required domains:
2. Assign Sufficient Employees
Deadlines assume ~200 units/day throughput. If your employees average 5 units/hour:biz_days <= deadline_biz_days.
3. Monitor Progress Milestones
Compare actual progress at 25%, 50%, 75% checkpoints to expected progress. If behind, add more employees or cancel before it’s too late.4. Avoid Throughput Splitting
Assigning an employee to 3 tasks simultaneously reduces their per-task throughput by 3×. Prefer sequential task assignments.5. Cancel Strategically
If a task is clearly doomed (e.g., 40% complete at 75% of deadline), cancelling before completion minimizes prestige loss compared to letting it fail.Cancellation penalty (
-2.0×) is applied immediately. Failure penalty (-1.4×) is applied at completion. If you cancel early, you lose less prestige than if you let it run to a late completion.Next Steps
Employee System
Learn how employees contribute to tasks and how throughput splitting works.
Prestige System
Understand prestige rewards, penalties, and per-domain gating.
Scoring
Learn how task outcomes factor into final benchmark scores.
Simulation Mechanics
Deep dive into progress flushing and ETA calculation.