Files
PaperClipAI/tests
Nicky LeachandPaperclip cc2e1d9d43 Honor plugin task driver concurrency defaults on hire (#23535)
## Thinking Path

> - Paperclip schedules work for agents.
> - Each agent has a limit on simultaneous runs.
> - A task driver can provide an execution environment with its own
capacity.
> - Previously the creation form sent the same limit for every driver.
> - A driver can now declare the value Core saves when a new agent has
no explicit limit.

## Linked Issues or Issue Description

**Subsystem affected**

Agent hiring and plugin environment drivers.

**Current behavior**

The create form, API, and import flow supply the global concurrency
default before the task driver can provide one.

**Proposed behavior**

Let each task driver declare an optional per-agent concurrency default.
Apply it once during hire and honor explicit agent limits.

## What Changed

- Refreshed the three SDK source pins for the changed files.
- Added the optional driver field `defaultMaxConcurrentRuns` with
integer bounds from 1 through 50.
- Applied it during hire using the resolved task environment. Saved the
resolved runtime configuration in hire approvals.
- Removed early defaults from the creation form, routes and new-agent
imports. Preserved saved limits on export, including explicit values
equal to the global default. Kept the current limit when importing an
update with an omitted limit.

## Verification

- [Full PR
CI](https://github.com/paperclipai/paperclip/actions/runs/47000023360)
passed on `83cce42b9a`. Server shard 16 passed on retry after a
PostgreSQL connection reset on the first attempt.
- `pnpm -r typecheck` passed. The SDK source pin check passed. `pnpm
verify` selected broad CI coverage because the SDK input registry
changed.
- On rebased commit `83cce42b9a`, all 441 tests in six focused Vitest
suites passed, including the MCP rollback test corrected in #23560. The
SDK source pin check passed.

## Risks

This affects new hires on drivers that opt in. Existing agents retain
their saved configuration. Single-run provider limits still apply. An
older client that explicitly sends the global default will keep that
value.

## Model Used

OpenAI GPT-6 via Codex. Used local source inspection, code editing,
TypeScript and test execution.

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` / `Refs #` OR (b) described the issue in-PR following the relevant
issue template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] All Paperclip CI gates are green
- [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before
requesting merge

---------

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-12-02 16:23:42 -08:00
..