# CompanyOS members edit shared records and trigger Routines with scopes

> Agno checks only permission scopes such as `products:write` and `routines:write` before a CompanyOS write, so with user isolation on, any member holding those scopes can change a Product, Project or Routine someone else created.

- Published: 2026-10-23
- Author: Samuel Jupe
- Categories: Changelog
- Canonical: https://www.agno.com/blog/companyos-members-edit-shared-records-and-trigger-routines-with-scopes
- Markdown: https://www.agno.com/blog/companyos-members-edit-shared-records-and-trigger-routines-with-scopes.md

Agno's `/company` routes in AgentOS now authorize every write by the caller's scopes alone and leave the creator's `user_id` on the record for attribution. Every member already reads all of [CompanyOS](https://www.agno.com/blog/introducing-companyos), yet with `user_isolation=True` a teammate holding every scope still hit "Cannot modify product owned by another user" when renaming a Product, archiving a Project, or pausing someone else's Routine.

We ran the same two-user session through the AgentOS routes on both releases with FastAPI's `TestClient`, with JWT auth set up the way the release's own tests do. Alice creates a Product, a Project and a Routine. Bob holds the Product, Project, Routine and schedule scopes plus `agents:reader:run`, and writes to each of them. The scheduler's background run is a stub taken from those tests, so the trigger records its run without calling a model.

```python
AgentOS(
    db=db,
    agents=[Agent(id="reader")],
    company=CompanyConfig(),
    authorization=True,
    authorization_config=AuthorizationConfig(
        verification_keys=[SECRET], algorithm="HS256", user_isolation=True
    ),
)
```

![Real output with user isolation on. Bob, holding full scopes, renames Alice's Product, archives her Project, pauses, resumes and triggers her Routine. Before, all five requests returned 403. Now they return 200 or 204, the triggered run is recorded as bob, and every record still lists alice as creator.](https://www.agno.com/images/v3-1-10-company-writes-by-scope.png)

A manual `POST /company/routines/{id}/trigger` needs `routines:write`, `schedules:write` and the executor's run scope. The run is saved under the caller's `user_id` and executes with the caller's authority, while scheduled runs keep the creator and the authorization stored on the Routine. A Routine with `auto_accept` stays locked to the user who authorized acceptance, because it runs on that person's saved grant.

Deployments that relied on user isolation to keep members off each other's Company records now control them through scopes only. A member with `products:delete` can archive any Product, and `wiki:write` covers every wiki page, company pages included.

See the [cookbook](https://github.com/agno-agi/agno/blob/main/cookbook/05_agent_os/30_company/README.md), and learn more about [per-user data isolation](https://docs.agno.com/agent-os/security/authorization/user-isolation) in the documentation.
