Skip to content

feat(teams): assign cards to a team and run triggers as a team - #701

Merged
artempartos merged 1 commit into
developfrom
artempartos/runs-as-trigger-feedback
Nov 11, 2026
Merged

artempartos merged 1 commit into
developfrom
artempartos/runs-as-trigger-feedback

Conversation

@artempartos

Copy link
Copy Markdown
Contributor

Summary

Project teams: a named group of a project's members with a strategy for picking who takes a run. A board card can be assigned to a team, and an off-board trigger (schedule, chat, webhook, tracker, event) can run as a team. Each run goes to one member and runs on that member's own agent account, so a member whose quota ran out is passed over until it resets instead of failing every run they own.

Design: docs/design/project-teams.md (status: built).

What changes

  • Teams page (Project → Teams): one card per team with its strategy, the members in order with whether each can take a run now (Ready / On hold until … / Can't take runs, reason on hover), who the next run goes to, and what uses the team. Owners and company admins create, edit, reorder and delete teams; any member can leave.
  • Picking a member (ProjectTeams::Picker): priority, round_robin or most_remaining; a member qualifies only with a credential for every runtime the run's steps need and no quota hold. A member already running a session on that runtime is passed over while another is free.
  • No member available: the run is created and fails at once with failure_reason: "team_unavailable", every step naming each member and why they were skipped.
  • Quota holds: a quota stop sets agent_credentials.quota_exhausted_until from the usage window's reset, the date the CLI printed, or an hour. A new sign-in clears it.
  • Retry on quota: a step set to retry is handed to the team's next member before retrying, behind the team-quota-retry Temporal patch (histories recorded before and after; replay test passes).
  • Event: workflow_run.quota_exceeded for event triggers; a webhook cannot forge it, and a run it started does not raise it again.
  • Board: assign a card to a team (card, drawer, bulk Assign), filter by team, runs show "Team → Person".
  • Triggers: Runs as → a person or a team, in the form, the REST API and the MCP trigger tools.
  • Membership: members are emailed when added or taken out (including when they lose project or company access); a profile setting keeps a user out of teams; every change is audited.
  • MCP: list_project_teams, create_project_team, update_project_team, delete_project_team; assignee_team_id / run_as_team_id on the board and trigger tools; teams in board_list_members.

Operator notes

  • One migration (create_project_teams): two new tables and nullable columns on board_tasks, trigger_bindings, workflow_runs, agent_credentials, users.
  • New Temporal activity workflow_reassign_run_owner_activity and patch team-quota-retry (registered in docs/architecture/temporal-versioning.md).

Open point

Whether running team work on members' own subscriptions fits each provider's terms is left to legal (noted in the design doc). Nothing in the code restricts which credential kinds a team may use.

Testing

  • Backend: full suite green locally (10228 runs, 0 failures) on the final code before the rebase.
  • Frontend: full Vitest suite with coverage green when run on its own (2472 tests); inside make check_all on a heavily loaded host a different handful of unrelated tests timed out on each run. CI is the judge.
  • rubocop, brakeman, eslint, tsc, fsd, system tests green locally.
  • Checked in the browser on a local stack: Teams page, editor, board assignment and filter, task runs, a team_unavailable run, trigger Runs as.

🤖 Generated with Claude Code

A team is a named group of a project's members with a strategy
(priority, round robin, most quota left). A card can be assigned to a
team and an off-board trigger can run as one; each run goes to the
member the strategy picks, so a member whose agent quota ran out is
passed over until it resets instead of failing every run they own.

A run no member can take fails at once and says why for each member.
A step that stops on quota and is set to retry is handed to the team's
next member, behind the team-quota-retry Temporal patch. Quota stops
also raise a workflow_run.quota_exceeded event for event triggers.

Design: docs/design/project-teams.md

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
@artempartos
artempartos merged commit ed6b69c into develop Nov 11, 2026
17 checks passed
NOX73 added a commit that referenced this pull request Nov 11, 2026
…s-0-1-0

* origin/develop:
  feat(coder): clone GitLab, Bitbucket and Azure DevOps repos in coder_prepare_repo (#703)
  fix(agents): show each runtime's own logo everywhere (#704)
  feat(teams): assign cards to a team and run triggers as a team (#701)
  feat(agents): collect the Copilot CLI transcript as a session log (#700)
  fix(agents): keep Grok and Antigravity conversations in the terminal scrollback (#698)
  feat(billing): redesign the Billing tab around active and previous subscriptions (#646)
  feat(web): switch the UI, admin, public pages and emails to Inter (#699)
  chore(deps): weekly dependency batch — aws-sdk-core 3.267 retry fix, prism 2, Mantine 9.7.5, runner Go 1.27.4 (#697)
  fix(board): leave archived tasks out of agent board listings (#690)
  feat(agents): add GitHub Copilot CLI as an agent runtime (#684)
  feat(runners): the callback proxy — the proxy sidecar, the host runner relay and the gateway proxy route (task #216, 8b) (#677)

Signed-off-by: Rozhnov Alexandr <[email protected]>
artempartos added a commit that referenced this pull request Nov 12, 2026
Project teams (#701) shipped without user-facing docs. The Team & access
page gains a Project teams section (strategies, who can take a run, quota
holds and retry, permissions, opting out), and every page that explains
who a run belongs to, the assignee, Runs as, or the related API and MCP
fields now mentions teams and links to it. The docs/ mirrors follow, and
the stale "Changing who an off-board trigger runs as" mirror section is
synced with the portal.

Signed-off-by: Artem Petrov <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant