paperclip/packages/shared/src
Dotta e8275318ba
[codex] Raise agent heartbeat concurrency default (#4954)
## Thinking Path

> - Paperclip orchestrates AI agents for zero-human companies
> - Agent heartbeat settings control how much parallel work one employee
can run
> - The previous default of 5 concurrent runs was too restrictive for
active local agent teams
> - The shared default, heartbeat clamp, docs, and route/import/UI
expectations need to agree
> - This pull request raises the default heartbeat concurrency to 20
while keeping explicit headroom up to 50 for power users
> - The benefit is higher throughput for agent teams without each new
agent needing manual runtime config edits

## What Changed

- Raised `AGENT_DEFAULT_MAX_CONCURRENT_RUNS` from 5 to 20.
- Raised the heartbeat service max clamp from 10 to 50, keeping the new
default below the ceiling.
- Updated V1 implementation docs and tests that assert default
imported/exported runtime config.
- Updated the new-agent UI runtime config test to assert the shared
default constant instead of duplicating the numeric value.

## Verification

- `pnpm exec vitest run
server/src/__tests__/agent-permissions-routes.test.ts
server/src/__tests__/company-portability.test.ts
ui/src/lib/new-agent-runtime-config.test.ts`

## Risks

- Medium risk: new agents can consume more local execution capacity by
default. The heartbeat scheduler still respects configured max
concurrency and budget/pause controls, and operators can lower or raise
the per-agent cap within the `1..50` clamp.

> For core feature work, check [`ROADMAP.md`](ROADMAP.md) first and
discuss it in `#dev` before opening the PR. Feature PRs that overlap
with planned core work may need to be redirected — check the roadmap
first. See `CONTRIBUTING.md`.

## Model Used

- OpenAI Codex, GPT-5 coding agent, tool use and local command
execution. Exact context window was not exposed in the runtime.

## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge

---------

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-05-01 10:42:56 -05:00
..
telemetry [codex] Harden execution reliability and heartbeat tooling (#3679) 2026-04-14 13:34:52 -05:00
types Add cheap model profiles for local adapters (#4881) 2026-04-30 15:32:04 -05:00
validators Add cheap model profiles for local adapters (#4881) 2026-04-30 15:32:04 -05:00
adapter-type.ts feat(adapters): external adapter plugin system with dynamic UI parser 2026-04-03 21:11:20 +01:00
adapter-types.test.ts [codex] Split backend control-plane QoL slice (#4700) 2026-04-28 16:46:45 -05:00
agent-url-key.ts feat: company portability — export/import companies and agents 2026-03-02 09:06:58 -06:00
api.ts [codex] Add issue subtree pause, cancel, and restore controls (#4332) 2026-04-23 14:51:46 -05:00
config-schema.ts Introduce bind presets for deployment setup 2026-04-11 07:09:07 -05:00
constants.ts [codex] Raise agent heartbeat concurrency default (#4954) 2026-05-01 10:42:56 -05:00
environment-support.test.ts Add sandbox environment support (#4415) 2026-04-24 12:15:53 -07:00
environment-support.ts Add ACPX local adapter runtime (#4893) 2026-04-30 19:57:05 -05:00
execution-workspace-guards.ts Guard closed isolated workspaces on issues 2026-04-04 17:48:54 -05:00
index.ts Add cheap model profiles for local adapters (#4881) 2026-04-30 15:32:04 -05:00
issue-references.test.ts Add first-class issue references (#4214) 2026-04-21 10:02:52 -05:00
issue-references.ts Add first-class issue references (#4214) 2026-04-21 10:02:52 -05:00
issue-thread-interactions.test.ts [codex] Add structured issue-thread interactions (#4244) 2026-04-21 20:15:11 -05:00
network-bind.ts Introduce bind presets for deployment setup 2026-04-11 07:09:07 -05:00
project-mentions.test.ts feat: implement multi-user access and invite flows (#3784) 2026-04-17 09:44:19 -05:00
project-mentions.ts feat: implement multi-user access and invite flows (#3784) 2026-04-17 09:44:19 -05:00
project-url-key.ts fix: append short UUID suffix to project slugs when non-ASCII characters are stripped to prevent slug collisions 2026-03-31 16:35:30 +00:00
routine-variables.test.ts [codex] Split backend control-plane QoL slice (#4700) 2026-04-28 16:46:45 -05:00
routine-variables.ts [codex] Split backend control-plane QoL slice (#4700) 2026-04-28 16:46:45 -05:00
workspace-commands.test.ts [codex] Improve workspace navigation and runtime UI (#4089) 2026-04-20 06:14:32 -05:00
workspace-commands.ts [codex] Improve workspace navigation and runtime UI (#4089) 2026-04-20 06:14:32 -05:00