You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
connector-openclaw: add lane support for OpenClaw webhook delivery #140
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:
constbody={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 gapchannel: 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 lane from connector config (cfg.lane) in init()
Read lane from 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-agentconnector: "@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 lane
Or per-route in the route config:
then:
actor: my-agentconfig:
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.
Activity
feat(connector-openclaw): add lane support for concurrency control (#140
feat(connector-openclaw): add lane support for concurrency control (#140