-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Problem
The @orgloop/connector-openclaw connector delivers events to OpenClaw's /hooks/agent endpoint but never passes a lane field in the request body. OpenClaw's hook handler accepts lane and uses it for scheduling — without it, all deliveries resolve to the nested lane which has a hardcoded maxConcurrent: 1.
When a pipeline fires many routes concurrently (e.g. labeling 5 issues triggers 5 routes simultaneously), all deliveries queue serially in the nested lane. We observed 15+ minute delays with 12 items backed up.
Root Cause
In target.js, the request body sent to /hooks/agent:
const body = {
message: this.buildMessage(event, routeConfig),
sessionKey: ...,
agentId: this.agentId,
wakeMode: routeConfig.wake_mode ?? 'now',
deliver: routeConfig.deliver ?? false,
// lane is never set ← this is the gap
channel: this.defaultChannel,
to: this.defaultTo,
};OpenClaw's /hooks/agent handler reads request.lane and passes it to resolveNestedAgentLane(). When absent, it defaults to the nested lane (concurrency: 1). Setting lane: "main" uses the main scheduling lane which respects agents.defaults.maxConcurrent (typically 4-30).
Proposed Fix
- Read
lanefrom connector config (cfg.lane) ininit() - Read
lanefrom route config (routeConfig.lane) for per-route override - Pass it in the request body:
lane: routeConfig.lane ?? this.lane ?? undefined
This allows users to configure in their connector YAML:
actors:
- id: my-agent
connector: "@orgloop/connector-openclaw"
config:
base_url: "http://127.0.0.1:18789"
auth_token_env: "${OPENCLAW_WEBHOOK_TOKEN}"
agent_id: "my-agent"
lane: "main" # ← use main scheduling laneOr per-route in the route config:
then:
actor: my-agent
config:
lane: "main"Impact
Any OrgLoop user with concurrent pipeline routes hitting OpenClaw will experience this bottleneck. The fix is backward-compatible — omitting lane preserves current behavior.
Workaround
Monkey-patch node_modules/@orgloop/connector-openclaw/dist/target.js to add lane support. Not recommended for production.