Background Tasks
Use this page when you want Loong to launch background delegated work and keep the operator contract task-first. The current public contract is:loong tasks createloong tasks listloong tasks statusloong tasks eventsloong tasks waitloong tasks cancelloong tasks recover
Task-First Model
Loong now treats delegated async work as a task-shaped operator surface. Three identifiers matter:task_idis the durable task identity you should pass back to task commandstask_session_idis the current runtime carrier for that task laneowner_session_idis runtime ownership metadata that stays visible for inspection, follow-up, and repair
- operators work through
tasks ... - runtime ownership still uses child sessions underneath
sessions ...remains the inspection and repair path, not the normal day-to-day task surface
What Task Status Means
tasks status and tasks wait surface derived task state instead of forcing
you to infer meaning from raw session fields.
Current task-first summary fields include:
task_status.statustask_status.needs_attentiontask_status.next_actiontask_status.signals
- queued vs running work
- approval-pending or blocked work
- overdue or recoverable work
- recovered, failed, or completed work
- session-scoped tool narrowing that materially changes what the child may do
When To Use Tasks Vs Sessions
Usetasks ... when:
- you are following delegated async work as a product object
- you need the next action for one task
- you want task lineage, task events, or task recovery without reasoning in raw session terms
sessions ... when:
- you are debugging runtime ownership directly
- you need branch heads, raw history, or lower-level session tree detail
- you are repairing runtime state outside the normal task workflow
Scope Of This First Slice
Included today:- delegated background work implemented through child-session runtime lanes
- task-first create, inspect, wait, follow, cancel, and recover flows
- cron
- heartbeat jobs
- daemon-owned always-on scheduling
- distributed schedulers
- web dashboards
Continue Reading
- Continue to Tools And Memory for the broader governed capability story.
- Continue to Gateway And Supervision for longer-lived ownership models.
- Continue to Tool Surface for the public visible-tool contract.