paperclipai/paperclip · error · Error
Window must be a positive number of seconds
Error message
Window must be a positive number of seconds
What it means
Error "Window must be a positive number of seconds" thrown in paperclipai/paperclip.
Source
Thrown at ui/src/pages/tools/PoliciesTab.tsx:239
}
const selectors: Record<string, unknown> = {};
if (form.actorType !== ANY_VALUE) selectors.actorType = form.actorType;
if (form.whenMode === "agent" && form.agentId !== ANY_VALUE) selectors.agentId = form.agentId;
if (form.whenMode === "project" && form.projectId !== ANY_VALUE) selectors.projectId = form.projectId;
if (form.usesMode === "app" && form.applicationId !== ANY_VALUE) selectors.applicationId = form.applicationId;
if (form.connectionId !== ANY_VALUE) selectors.connectionId = form.connectionId;
if (form.usesMode === "capability" && form.riskLevel !== ANY_VALUE) selectors.riskLevel = form.riskLevel;
const toolNames = form.usesMode === "actions" ? parseList(form.toolNames) : [];
if (toolNames.length === 1) selectors.toolName = toolNames[0];
if (toolNames.length > 1) selectors.toolNames = toolNames;
let config: Record<string, unknown> | null = null;
if (form.policyType === "rate_limit") {
const limit = Number(form.rateLimitLimit);
const windowSeconds = Number(form.rateLimitWindowSeconds);
if (!Number.isInteger(limit) || limit <= 0) throw new Error("Limit must be a positive integer");
if (!Number.isInteger(windowSeconds) || windowSeconds <= 0) {
throw new Error("Window must be a positive number of seconds");
}
config = { rateLimit: { limit, windowSeconds, keyBy: form.rateLimitKeyBy } };
}
return {
name: form.name.trim(),
description: form.description.trim() || null,
policyType: form.policyType,
priority,
enabled: form.enabled,
selectors,
conditions: null,
config,
};
}
function windowLabel(seconds: string | number | null | undefined) {
const value = Number(seconds);View on GitHub (pinned to 120ae5428f)
Solutions
- Enter a positive number of seconds for the window.
When it happens
Trigger: Thrown at ui/src/pages/tools/PoliciesTab.tsx:239 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18).
Data as JSON: /api/errors/c110accbf1f3b0d0.
Report an issue: GitHub.