openclaw - 💡(How to fix) Fix message(action=send) misclassified as poll when poll duration defaults are 0 [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#54280Fetched 2026-04-08 01:29:42
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
closed ×1locked ×1

Root Cause

In the packed runtime, hasPollCreationParams(params) treats any finite number as an active poll parameter:

if (typeof value === "number" && Number.isFinite(value)) return true;

That means values like:

  • pollDurationHours: 0
  • pollDurationSeconds: 0

are interpreted as if the caller explicitly requested poll creation. Then action="send" is rejected.

Code Example

Poll fields require action "poll"; use action "poll" instead of "send".

---

if (typeof value === "number" && Number.isFinite(value)) return true;

---

if (typeof value === "number" && Number.isFinite(value) && value > 0) return true;
RAW_BUFFERClick to expand / collapse

Bug Description

Using the shared message tool with action="send" can fail with:

Poll fields require action "poll"; use action "poll" instead of "send".

This happens even for ordinary text sends, when poll-related numeric fields are present with default value 0.

Root Cause

In the packed runtime, hasPollCreationParams(params) treats any finite number as an active poll parameter:

if (typeof value === "number" && Number.isFinite(value)) return true;

That means values like:

  • pollDurationHours: 0
  • pollDurationSeconds: 0

are interpreted as if the caller explicitly requested poll creation. Then action="send" is rejected.

Expected Behavior

For normal send requests:

  • default numeric values such as 0 should not activate poll validation
  • only meaningful poll values should trigger the poll-only path

Suggested Fix

Tighten numeric poll-param detection so it only counts when the numeric value is actually meaningful, for example:

if (typeof value === "number" && Number.isFinite(value) && value > 0) return true;

and similarly for stringified numbers.

Why this matters

This can break ordinary startup notifications or any shared message send path that carries defaulted poll-related numeric fields in the params object.

Notes

This report intentionally omits any environment-specific or user-specific details.

extent analysis

Fix Plan

To resolve the issue, we need to modify the hasPollCreationParams(params) function to only consider numeric values greater than 0 as active poll parameters. Here are the steps:

  • Update the hasPollCreationParams(params) function to check for numeric values greater than 0:
if (typeof value === "number" && Number.isFinite(value) && value > 0) return true;
  • Also, update the check for stringified numbers:
if (typeof value === "string" && !isNaN(Number(value)) && Number(value) > 0) return true;
  • Ensure that the updated function is deployed to the packed runtime environment.

Verification

To verify that the fix worked, test the message tool with action="send" and poll-related numeric fields with default value 0. The tool should no longer throw the "Poll fields require action 'poll'" error.

Example Code

Here's an example of the updated hasPollCreationParams(params) function:

function hasPollCreationParams(params) {
  for (const key in params) {
    const value = params[key];
    if (typeof value === "number" && Number.isFinite(value) && value > 0) return true;
    if (typeof value === "string" && !isNaN(Number(value)) && Number(value) > 0) return true;
  }
  return false;
}

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 message(action=send) misclassified as poll when poll duration defaults are 0 [1 participants]