openclaw - ✅(Solved) Fix [Bug]: Schema .strict() rejects `paperclip` property from Paperclip 2026.416.0 wake payload [1 pull requests, 1 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#68347Fetched 2026-04-18 05:53:08
View on GitHub
Comments
0
Participants
1
Timeline
7
Reactions
0
Participants
Timeline (top)
referenced ×3labeled ×2closed ×1cross-referenced ×1

After upgrading Paperclip to 2026.416.0, all openclaw_gateway adapter runs fail with:

invalid agent params: at root: unexpected property 'paperclip'

Paperclip now injects a paperclip: {...} object into its wake payload, but OpenClaw's agent schema uses Zod's .strict() mode which rejects any unknown property.

Error Message

Actual: Run fails with schema validation error.

Error output (redacted)

  • ✅ Updated OpenClaw to latest stable: still 2026.4.15, same error
  • ✅ Updated OpenClaw via --channel beta: still 2026.4.15, same error

Root Cause

Root cause (located)

Fix Action

Fix / Workaround

  • All Paperclip 2026.416.0 → OpenClaw 2026.4.15 integrations are broken

  • openclaw_gateway adapter becomes unusable

  • Affects any user who has upgraded Paperclip but is on latest (or earlier) OpenClaw

  • No workaround available via openclaw update (including --channel beta) — 2026.4.15 is the latest

  • ✅ Updated OpenClaw to latest stable: still 2026.4.15, same error

  • ✅ Updated OpenClaw via --channel beta: still 2026.4.15, same error

  • ✅ Ran openclaw doctor: no actionable fixes surfaced

  • ✅ Verified adapter config is correct (test probe passes: Gateway connect probe succeeded)

  • ❌ Not patching compiled dist/ files — wouldn't survive next update

Happy to:

  • Provide additional logs
  • Test a patch branch
  • Share full unredacted payload (privately if needed)

PR fix notes

PR #68355: fix: allow unknown properties in WakeParams schema (#68347)

Description (problem / solution / changelog)

Fixes #68347

Problem: WakeParamsSchema used additionalProperties: false (AJV), rejecting unknown properties like paperclip injected by Paperclip 2026.416.0 in wake payloads.

Fix: Changed to additionalProperties: true so unknown properties from external tools/plugins are silently accepted. This improves forward compatibility — new tools may add properties that shouldn't break validation.

Tests: Added test verifying unknown properties are accepted without error.

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • src/gateway/protocol/index.test.ts (modified, +33/-1)
  • src/gateway/protocol/schema/agent.ts (modified, +1/-1)

Code Example

Redacted stderr/stdout from Paperclip run:

[openclaw-gateway] outbound payload (redacted): {
  "message":"Paperclip wake event for a cloud adapter...",
  "sessionKey":"paperclip",
  "idempotencyKey":"<uuid>",
  "paperclip":{
    "runId":"<uuid>",
    "companyId":"<uuid>",
    "agentId":"<uuid>",
    "agentName":"OpenClaw",
    "taskId":null,
    "issueId":null,
    "issueIds":[],
    "wakeReason":"retry_failed_run",
    "apiUrl":"http://localhost:3100/",
    "cwd":"C:\\Users\\elban\\.paperclip\\instances\\default\\workspaces\\<uuid>",
    "source":"agent_home",
    "mode":"shared_workspace",
    "strategy":"project_primary",
    "timeout":120000
  }
}
[openclaw-gateway] connected protocol=3
[openclaw-gateway] request failed: invalid agent params: at root: unexpected property 'paperclip'

Root cause located:
- File: dist/zod-schema.agent-runtime-<hash>.js
- Schema: AgentEntrySchema
- Mode: .strict() rejects unknown properties
- Missing field: `paperclip` not in AgentEntrySchema allowed keys

Verification steps completed:
- `openclaw doctor`: all checks pass, gateway healthy
- `openclaw update`: already on latest stable (2026.4.15)
- `openclaw update --channel beta`: no newer version available (still 2026.4.15)
- Adapter Test Environment in Paperclip UI: connection probe succeeds ("Gateway connect probe succeeded")
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Summary

After upgrading Paperclip to 2026.416.0, all openclaw_gateway adapter runs fail with:

invalid agent params: at root: unexpected property 'paperclip'

Paperclip now injects a paperclip: {...} object into its wake payload, but OpenClaw's agent schema uses Zod's .strict() mode which rejects any unknown property.

Environment

ComponentVersion
OpenClaw2026.4.15 (041266a)
Paperclip2026.416.0
Node.jsv22.22.2
OSWindows 11 + WSL2 (Ubuntu 24.04.3 LTS)
Install path/home/elban/.npm-global/lib/node_modules/openclaw
ChannelTested on both stable and beta — same version, same failure

Reproduction steps

  1. Install Paperclip 2026.416.0 on Windows (via npx paperclipai onboard)
  2. Install OpenClaw 2026.4.15 in WSL2 (via curl -fsSL https://openclaw.ai/install.sh | bash)
  3. In Paperclip, create an agent with adapter type openclaw_gateway
  4. Configure gateway URL (ws://localhost:18789/), token, and chat ID
  5. Create any issue assigned to that agent
  6. Trigger a run

Expected: Message relays to Telegram. Actual: Run fails with schema validation error.

Error output (redacted)

[openclaw-gateway] outbound payload (redacted): { "message":"Paperclip wake event for a cloud adapter...", "sessionKey":"paperclip", "idempotencyKey":"<uuid>", "paperclip":{ "runId":"<uuid>", "companyId":"<uuid>", "agentId":"<uuid>", "agentName":"OpenClaw", "taskId":null, "issueId":null, "issueIds":[], "wakeReason":"retry_failed_run", "wakeComment":null, "approvalId":null, "approvalStatus":null, "apiUrl":"http://localhost:3100/", "cwd":"C:\Users\elban.paperclip\instances\default\workspaces<uuid>", "source":"agent_home", "mode":"shared_workspace", "strategy":"project_primary", "projectId":null, "workspaceId":null, "repoId":null, "repoRef":null, "branchName":null, "workTreePath":null, "agentName":"OpenClaw", "taskId":null, "issueId":null, "issueIds":[] }, "timeout":120000 } [openclaw-gateway] connected protocol=3 [openclaw-gateway] request failed: invalid agent params: at root: unexpected property 'paperclip'

Root cause (located)

  • File: dist/zod-schema.agent-runtime-<hash>.js (compiled bundle)
  • Schema: AgentEntrySchema
  • Issue: Schema uses .strict() which rejects unknown keys
  • Missing: No paperclip property defined in the allowed field list

Impact

  • All Paperclip 2026.416.0 → OpenClaw 2026.4.15 integrations are broken
  • openclaw_gateway adapter becomes unusable
  • Affects any user who has upgraded Paperclip but is on latest (or earlier) OpenClaw
  • No workaround available via openclaw update (including --channel beta) — 2026.4.15 is the latest

Suggested fixes (for maintainer consideration)

Option A — Add field with proper typing Define a paperclip schema with the expected sub-fields (runId, companyId, agentId, agentName, taskId, issueId, issueIds, wakeReason, wakeComment, approvalId, approvalStatus, apiUrl, cwd, source, mode, strategy, projectId, workspaceId, repoId, repoRef, branchName, workTreePath, timeout) and wire handlers to actually use this metadata.

Option B — Add as opaque accepted field Add paperclip: z.unknown().optional() to AgentEntrySchema. Accepts the field without breaking but doesn't validate or use its contents. Simpler but loses the metadata.

Option C — Coordinate with Paperclip team Align on a formal schema for cross-orchestrator wake payloads so both sides validate the same way.

What I've tried

  • ✅ Updated OpenClaw to latest stable: still 2026.4.15, same error
  • ✅ Updated OpenClaw via --channel beta: still 2026.4.15, same error
  • ✅ Ran openclaw doctor: no actionable fixes surfaced
  • ✅ Verified adapter config is correct (test probe passes: Gateway connect probe succeeded)
  • ❌ Not patching compiled dist/ files — wouldn't survive next update

Related

  • Paperclip release that introduced the field: 2026.416.0 (Apr 16, 2026)
  • Paperclip migrations applied during upgrade: 0049 through 0056

Willingness to help

Happy to:

  • Provide additional logs
  • Test a patch branch
  • Share full unredacted payload (privately if needed)

Thanks for the great tool — looking forward to the fix.

Steps to reproduce

  1. Install Paperclip 2026.416.0 on Windows (via npx paperclipai onboard).
  2. Install OpenClaw 2026.4.15 in WSL2 (via curl -fsSL https://openclaw.ai/install.sh | bash).
  3. In Paperclip, create an agent with adapter type openclaw_gateway.
  4. Configure adapter: gateway URL ws://localhost:18789/, gateway token, Telegram chat ID.
  5. Create any issue assigned to that agent and trigger a run.
  6. Observe the run fails with invalid agent params: at root: unexpected property 'paperclip'.

Expected behavior

The openclaw_gateway adapter accepts the wake payload from Paperclip 2026.416.0 and relays the message to the configured Telegram chat. This was the observed behavior with Paperclip versions released before April 16, 2026 (same OpenClaw version 2026.4.15).

Actual behavior

Every run fails at payload validation. OpenClaw stderr:

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

Paperclip 2026.416.0 now injects a paperclip:{...} object into the wake payload. OpenClaw's AgentEntrySchema in dist/zod-schema.agent-runtime-<hash>.js uses Zod .strict() which rejects any property not explicitly listed in the schema. The paperclip property is not defined, so the entire payload is rejected and no message is relayed.

OpenClaw version

2026.4.15 (build 041266a)

Operating system

Windows 11 + WSL2 (Ubuntu 24.04.3 LTS, kernel 6.6.87.2-microsoft-standard-WSL2)

Install method

npm global (installed via official install.sh script from openclaw.ai)

Model

N/A — this is a gateway adapter protocol bug, not a model/inference issue. The failure occurs during payload schema validation, before any model call.

Provider / routing chain

N/A — failure is in the openclaw_gateway adapter schema validator (AgentEntrySchema), not in any provider routing path. Paperclip → OpenClaw gateway WebSocket connection succeeds (protocol=3 handshake completes), but the inbound agent params payload is rejected before any provider/model is invoked.

Additional provider/model setup details

Not applicable for this bug. For completeness:

  • OpenClaw gateway URL: ws://localhost:18789/
  • Gateway token: configured and working (auth succeeded — "keySource=configured")
  • Paperclip version: 2026.416.0 (Apr 16, 2026)
  • Paperclip migrations applied during upgrade: 0049 through 0056

Logs, screenshots, and evidence

Redacted stderr/stdout from Paperclip run:

[openclaw-gateway] outbound payload (redacted): {
  "message":"Paperclip wake event for a cloud adapter...",
  "sessionKey":"paperclip",
  "idempotencyKey":"<uuid>",
  "paperclip":{
    "runId":"<uuid>",
    "companyId":"<uuid>",
    "agentId":"<uuid>",
    "agentName":"OpenClaw",
    "taskId":null,
    "issueId":null,
    "issueIds":[],
    "wakeReason":"retry_failed_run",
    "apiUrl":"http://localhost:3100/",
    "cwd":"C:\\Users\\elban\\.paperclip\\instances\\default\\workspaces\\<uuid>",
    "source":"agent_home",
    "mode":"shared_workspace",
    "strategy":"project_primary",
    "timeout":120000
  }
}
[openclaw-gateway] connected protocol=3
[openclaw-gateway] request failed: invalid agent params: at root: unexpected property 'paperclip'

Root cause located:
- File: dist/zod-schema.agent-runtime-<hash>.js
- Schema: AgentEntrySchema
- Mode: .strict() rejects unknown properties
- Missing field: `paperclip` not in AgentEntrySchema allowed keys

Verification steps completed:
- `openclaw doctor`: all checks pass, gateway healthy
- `openclaw update`: already on latest stable (2026.4.15)
- `openclaw update --channel beta`: no newer version available (still 2026.4.15)
- Adapter Test Environment in Paperclip UI: connection probe succeeds ("Gateway connect probe succeeded")

Impact and severity

  • Affected users/systems/channels: All Paperclip + OpenClaw users who have upgraded Paperclip to 2026.416.0 while on OpenClaw 2026.4.15 or earlier. Affects Telegram, and any other channel routed through openclaw_gateway adapter.
  • Severity: HIGH — blocks all agent-to-channel relay; adapter is unusable.
  • Frequency: 100% — every run fails at validation, not intermittent.
  • Consequence: No agent-initiated messages reach Telegram/other channels. Paperclip keeps retrying and generating failed runs, filling logs. Workaround requires downgrading Paperclip or patching OpenClaw source (not recommended — would not survive updates).

Additional information

Last known good: Paperclip versions released before April 16, 2026 (same OpenClaw 2026.4.15). First known bad: Paperclip 2026.416.0 (released Apr 16, 2026).

Suggested fixes for maintainer consideration:

Option A (proper) — Add paperclip to AgentEntrySchema with typed sub-fields: runId, companyId, agentId, agentName, taskId, issueId, issueIds, wakeReason, wakeComment, approvalId, approvalStatus, apiUrl, cwd, source, mode, strategy, projectId, workspaceId, repoId, repoRef, branchName, workTreePath, timeout. Then wire handlers to actually use this metadata.

Option B (minimal) — Add paperclip: z.unknown().optional() to AgentEntrySchema. Accepts the field without validation. Lowest risk but no metadata consumption.

Option C (coordination) — Align with Paperclip team on a shared schema for cross-orchestrator wake payloads so both sides validate consistently.

Temporary workaround (NOT recommended): patching dist/zod-schema.agent-runtime-<hash>.js locally to add the field does not survive openclaw update (build hash changes every release).

Willingness to help:

  • Can provide additional unredacted logs privately
  • Happy to test a patch branch before release
  • Can file corresponding issue on Paperclip side if helpful

extent analysis

TL;DR

To fix the issue, update the AgentEntrySchema in OpenClaw to include the paperclip property, either by adding it with proper typing or by making it an optional unknown field.

Guidance

  1. Update the schema: Modify the AgentEntrySchema in dist/zod-schema.agent-runtime-<hash>.js to include the paperclip property.
  2. Add proper typing: Define a schema for the paperclip object with its expected sub-fields, such as runId, companyId, agentId, etc.
  3. Make it optional: Alternatively, add paperclip: z.unknown().optional() to the schema to accept the field without validation.
  4. Test the changes: Verify that the updated schema resolves the validation error and allows the openclaw_gateway adapter to function correctly.

Example

// Option A: Add paperclip with proper typing
const AgentEntrySchema = z.object({
  // ... existing fields ...
  paperclip: z.object({
    runId: z.string(),
    companyId: z.string(),
    agentId: z.string(),
    // ... other paperclip sub-fields ...
  }).optional(),
});

// Option B: Add paperclip as an optional unknown field
const AgentEntrySchema = z.object({
  // ... existing fields ...
  paperclip: z.unknown().optional(),
});

Notes

  • The paperclip property is introduced in Paperclip version 2026.416.0, so this fix is only necessary for users who have upgraded to this version.
  • The suggested fixes are for the OpenClaw maintainer to consider, and the user is willing to help test a patch branch.

Recommendation

Apply workaround Option B: Add paperclip: z.unknown().optional() to the AgentEntrySchema. This is the simplest and lowest-risk solution, although it does not validate or use the contents of the paperclip field.

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…

FAQ

Expected behavior

The openclaw_gateway adapter accepts the wake payload from Paperclip 2026.416.0 and relays the message to the configured Telegram chat. This was the observed behavior with Paperclip versions released before April 16, 2026 (same OpenClaw version 2026.4.15).

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 - ✅(Solved) Fix [Bug]: Schema .strict() rejects `paperclip` property from Paperclip 2026.416.0 wake payload [1 pull requests, 1 participants]