Skip to content
Changelog

CompanyOS fixes for Task runs, Product Sources and accepted work

October 23, 20261 min read

Agno's durable queue, QueueConfig(durable=True), writes a CompanyOS Task's result before it finishes the run's ticket, and in earlier releases a Company database that kept failing left that ticket in running and made the sweep raise. Two smaller fixes in this release change what agents see about Sources and accepted Tasks.

Task results stay off the queue's critical path

The worker now checks the run row when the Task write raises. If the row is COMPLETED, ERROR or CANCELLED and the Task records this run as its reservation, the worker logs the error and finishes the ticket, and Company recovery rebuilds the Task result later. The sweep catches each job's failure on its own, so one broken Company job leaves the rest of the batch and the next claims running. A PermissionError from the executor's run check now fails the ticket on its first attempt. A same-attempt POST /company/tasks/{id}/runs also reconciles a finished run without AgentOS(scheduler=True).

We ran the release's own queue fixture on both releases: a SQLite Company database, a queue on embedded Postgres, the tests' OfflineModel stand-in, and complete_task_run patched to raise.

# Before (real output)
Task write fails, after the sweep -> ticket: running
  sweep raised RuntimeError: Company database unavailable
unrelated team run after one poll tick: queued
revoked run permission -> ticket: queued, attempt 1 of 2
 
# Now (real output)
Task write fails, after the sweep -> ticket: completed
unrelated team run after one poll tick: completed
revoked run permission -> ticket: failed, attempt 1 of 2
  error: permanent: Run permission was revoked

Sources say whether an agent can read them

CompanyTools.list_product_sources and its async twin add readable and checkout_supported to each row. Company Manager used to see a remote Git URL among its readers and call read_product_source, which rejects Git URLs. Its instructions now send it to readable Sources and to the Product's local repository Source for code.

# Before (real output)
{'type': 'git', 'reference': 'https://github.com/agno-agi/agno'}
{'type': 'website', 'reference': 'https://docs.agno.com'}
{'type': 'git', 'reference': '/var/folders/.../tmp3xhp0i01'}
 
# Now (real output)
{'type': 'git', 'reference': '/var/folders/.../tmpp8mqtm5l', 'readable': True, 'checkout_supported': False}
{'type': 'website', 'reference': 'https://docs.agno.com', 'readable': True, 'checkout_supported': False}
{'type': 'git', 'reference': 'https://github.com/agno-agi/agno', 'readable': False, 'checkout_supported': True}

Accepted Tasks run with an execution stage

The executor input built by POST /company/tasks/{id}/runs carries an execution_context next to brief, wiki and evidence. Company Manager also keeps a Routine's proposal-only restriction out of the briefs it writes for future Tasks.

"execution_context": {
  "stage": "accepted_task_execution",
  "task_id": "1afb4e5b-121b-4ca3-83d9-99a37f95105a",
  "instructions": "Execute this accepted Task and return its deliverable with verification evidence. This is execution, not a request to acknowledge or propose the Task. Preserve the brief's scope and restrictions; acceptance grants no additional permissions. If instructions conflict or the work cannot be completed within those bounds, report the precise blocker and what remains undone."
}

See the cookbook, and learn more about the durable queue in the documentation.

Frequently asked questions

Once the run row is terminal and the Task records that run as its reservation, the queue worker logs the failed Task write and finishes the ticket. Company recovery rebuilds the Task result from the run row after the database comes back.

No. The ticket fails on its first attempt with an error starting permanent:, the run row is marked ERROR, and the Task gets an ERROR result.

Websites, Markdown and local Git paths come back from list_product_sources with readable: true. A Git URL comes back with checkout_supported: true and serves sandbox checkout and publication.

A strict input schema on a Task executor may need to allow the additional execution_context key, since AgentOS validates the input as before.

Shipped around the same time