The open-source app everyone uses to manage agents at work
TypeScript acpxagent-orchestrationagent-skillsagentic-aiai-agentsai-engineeringai-governanceai-toolsautonomous-agentsclaudeclaude-codeclaude-skillscodexhermesllmmcpmulti-agentopenclawproject-managementworkflow-automation
[codex] Raise agent heartbeat concurrency default (#4954)
Dottae8275318ba1e
diff --git a/doc/SPEC-implementation.md b/doc/SPEC-implementation.mdindex d77384ee4a..22075e0453 100644--- a/doc/SPEC-implementation.md+++ b/doc/SPEC-implementation.md@@ -676,7 +676,7 @@ Per-agent schedule fields in `adapter_config`:- `enabled` boolean- `intervalSec` integer (minimum 30)-- `maxConcurrentRuns` integer; new agents default to `5`+- `maxConcurrentRuns` integer; new agents default to `20`; scheduler clamps configured values to `1..50`Scheduler must skip invocation when:diff --git a/packages/shared/src/constants.ts b/packages/shared/src/constants.tsindex 8b196e9352..8cbe9eefdf 100644--- a/packages/shared/src/constants.ts+++ b/packages/shared/src/constants.ts@@ -72,7 +72,7 @@ export const AGENT_ROLE_LABELS: Record<AgentRole, string> = {general: "General",};-export const AGENT_DEFAULT_MAX_CONCURRENT_RUNS = 5;+export const AGENT_DEFAULT_MAX_CONCURRENT_RUNS = 20;export const WORKSPACE_BRANCH_ROUTINE_VARIABLE = "workspaceBranch";export const MODEL_PROFILE_KEYS = ["cheap"] as const;diff --git a/server/src/__tests__/agent-permissions-routes.test.ts b/server/src/__tests__/agent-permissions-routes.test.tsindex 85d4f1801f..624f37727e 100644--- a/server/src/__tests__/agent-permissions-routes.test.ts+++ b/server/src/__tests__/agent-permissions-routes.test.ts@@ -901,7 +901,7 @@ describe.sequential("agent permission routes", () => {heartbeat: {enabled: false,intervalSec: 3600,- maxConcurrentRuns: 5,+ maxConcurrentRuns: 20,},},}),@@ -939,7 +939,7 @@ describe.sequential("agent permission routes", () => {heartbeat: {enabled: false,intervalSec: 3600,- maxConcurrentRuns: 5,+ maxConcurrentRuns: 20,},},}),diff --git a/server/src/__tests__/company-portability.test.ts b/server/src/__tests__/company-portability.test.tsindex 017943850e..fecd7a7835 100644--- a/server/src/__tests__/company-portability.test.ts+++ b/server/src/__tests__/company-portability.test.ts@@ -2158,7 +2158,7 @@ describe("company portability", () => {runtimeConfig: {heartbeat: {enabled: false,- maxConcurrentRuns: 5,+ maxConcurrentRuns: 20,},},});@@ -2237,7 +2237,7 @@ describe("company portability", () => {runtimeConfig: {heartbeat: {enabled: false,- maxConcurrentRuns: 5,+ maxConcurrentRuns: 20,},},}));diff --git a/server/src/services/heartbeat.ts b/server/src/services/heartbeat.tsindex f7c0a220bd..41383f6f29 100644--- a/server/src/services/heartbeat.ts+++ b/server/src/services/heartbeat.ts@@ -145,7 +145,7 @@ const MAX_RUN_EVENT_PAYLOAD_OBJECT_KEYS = 100;const MAX_RUN_EVENT_PAYLOAD_DEPTH = 6;const HEARTBEAT_MAX_CONCURRENT_RUNS_DEFAULT = AGENT_DEFAULT_MAX_CONCURRENT_RUNS;const HEARTBEAT_MAX_CONCURRENT_RUNS_MIN = 1;-const HEARTBEAT_MAX_CONCURRENT_RUNS_MAX = 10;+const HEARTBEAT_MAX_CONCURRENT_RUNS_MAX = 50;const LIVENESS_BOOKKEEPING_ACTIVITY_ACTIONS = ["environment.lease_acquired","environment.lease_released",diff --git a/ui/src/lib/new-agent-runtime-config.test.ts b/ui/src/lib/new-agent-runtime-config.test.tsindex f33cdc8538..3a72943c3f 100644--- a/ui/src/lib/new-agent-runtime-config.test.ts+++ b/ui/src/lib/new-agent-runtime-config.test.ts@@ -1,5 +1,6 @@// @vitest-environment nodeimport { describe, expect, it } from "vitest";+import { AGENT_DEFAULT_MAX_CONCURRENT_RUNS } from "@paperclipai/shared";import { buildNewAgentRuntimeConfig } from "./new-agent-runtime-config";describe("buildNewAgentRuntimeConfig", () => {@@ -10,7 +11,7 @@ describe("buildNewAgentRuntimeConfig", () => {intervalSec: 300,wakeOnDemand: true,cooldownSec: 10,- maxConcurrentRuns: 5,+ maxConcurrentRuns: AGENT_DEFAULT_MAX_CONCURRENT_RUNS,},});});@@ -27,7 +28,7 @@ describe("buildNewAgentRuntimeConfig", () => {intervalSec: 3600,wakeOnDemand: true,cooldownSec: 10,- maxConcurrentRuns: 5,+ maxConcurrentRuns: AGENT_DEFAULT_MAX_CONCURRENT_RUNS,},});});