openclaw - 💡(How to fix) Fix Paperclip adapter sends 'paperclip' property rejected by AgentParamsSchema (additionalProperties: false) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#72313Fetched 2026-04-27 05:31:44
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Timeline (top)
closed ×1commented ×1

When using Paperclip with the OpenClaw gateway adapter (@paperclipai/[email protected]), every heartbeat run fails immediately with:

[openclaw-gateway] request failed: invalid agent params: at root: unexpected property 'paperclip'

Root Cause

The Paperclip adapter includes a paperclip metadata object at the root of the WebSocket agent request payload (line 903 of execute.js):

agentParams.paperclip = paperclipPayload;

The payload sent to the gateway looks like:

{
  "message": "Paperclip wake event...",
  "sessionKey": "paperclip:issue:...",
  "idempotencyKey": "...",
  "paperclip": {
    "runId": "...",
    "companyId": "...",
    "agentId": "...",
    ...
  },
  "timeout": 120000
}

However, AgentParamsSchema in protocol-BQNae9I-.js (and confirmed identical in 2026.4.24) is defined with { additionalProperties: false } and does not include a paperclip field — causing schema validation to reject the request before it reaches the agent.

Fix Action

Workaround

Adding paperclip: Type.Optional(Type.Unknown()) to AgentParamsSchema in the installed package resolves the issue immediately (tested). OpenClaw does not appear to consume the paperclip property at runtime — it only needs to pass schema validation.

Code Example

[openclaw-gateway] request failed: invalid agent params: at root: unexpected property 'paperclip'

---

agentParams.paperclip = paperclipPayload;

---

{
  "message": "Paperclip wake event...",
  "sessionKey": "paperclip:issue:...",
  "idempotencyKey": "...",
  "paperclip": {
    "runId": "...",
    "companyId": "...",
    "agentId": "...",
    ...
  },
  "timeout": 120000
}

---

paperclip: Type.Optional(Type.Unknown())
RAW_BUFFERClick to expand / collapse

Bug Report

Summary

When using Paperclip with the OpenClaw gateway adapter (@paperclipai/[email protected]), every heartbeat run fails immediately with:

[openclaw-gateway] request failed: invalid agent params: at root: unexpected property 'paperclip'

Root Cause

The Paperclip adapter includes a paperclip metadata object at the root of the WebSocket agent request payload (line 903 of execute.js):

agentParams.paperclip = paperclipPayload;

The payload sent to the gateway looks like:

{
  "message": "Paperclip wake event...",
  "sessionKey": "paperclip:issue:...",
  "idempotencyKey": "...",
  "paperclip": {
    "runId": "...",
    "companyId": "...",
    "agentId": "...",
    ...
  },
  "timeout": 120000
}

However, AgentParamsSchema in protocol-BQNae9I-.js (and confirmed identical in 2026.4.24) is defined with { additionalProperties: false } and does not include a paperclip field — causing schema validation to reject the request before it reaches the agent.

Affected Versions

  • OpenClaw: 2026.4.22 and 2026.4.24 (confirmed same schema in both)
  • Paperclip adapter: @paperclipai/[email protected]

Impact

All Paperclip heartbeat runs fail with openclaw_gateway_request_failed. Assigned tasks can never be picked up via the normal heartbeat flow and permanently enter a blocked state.

Workaround

Adding paperclip: Type.Optional(Type.Unknown()) to AgentParamsSchema in the installed package resolves the issue immediately (tested). OpenClaw does not appear to consume the paperclip property at runtime — it only needs to pass schema validation.

Fix (one-liner)

In AgentParamsSchema definition, add:

paperclip: Type.Optional(Type.Unknown())

before the closing }, { additionalProperties: false }.

extent analysis

TL;DR

Add paperclip: Type.Optional(Type.Unknown()) to the AgentParamsSchema definition to resolve the schema validation issue.

Guidance

  • Verify the AgentParamsSchema definition in protocol-BQNae9I-.js to ensure it matches the expected schema with { additionalProperties: false }.
  • Update the AgentParamsSchema definition by adding paperclip: Type.Optional(Type.Unknown()) before the closing }, { additionalProperties: false }.
  • Test the updated schema to ensure it resolves the heartbeat run failures.
  • Consider updating the Paperclip adapter to a version that includes the updated schema, if available.

Example

// Updated AgentParamsSchema definition
const AgentParamsSchema = {
  // ... existing properties ...
  paperclip: Type.Optional(Type.Unknown())
}, { additionalProperties: false };

Notes

This fix assumes that the paperclip property is not consumed by OpenClaw at runtime and only needs to pass schema validation. If OpenClaw does consume the paperclip property, additional changes may be required.

Recommendation

Apply workaround: Add paperclip: Type.Optional(Type.Unknown()) to the AgentParamsSchema definition, as this has been tested and confirmed to resolve the issue immediately.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Paperclip adapter sends 'paperclip' property rejected by AgentParamsSchema (additionalProperties: false) [1 comments, 2 participants]