paperclipai/paperclip · error · ToolGatewayHttpError
missing_issue_id
missing_issue_id
Error message
issueId is required when the session is not issue-scoped
What it means
get_issue_context guard: the session is not issue-scoped (no session.issueId) and the caller did not pass an issueId parameter, so there is no way to know which issue's context to fetch. Provide an explicit issueId or open the session against a checked-out issue.
Source
Thrown at server/src/services/tool-gateway.ts:2146
async function searchableOnDemandTools(session: ToolGatewaySession): Promise<ToolGatewayDescriptor[]> {
const tools = (await connectedMcpToolsForCompany(session.companyId)).filter(isOnDemandRemoteTool);
const decisions = await Promise.all(tools.map(async (tool) => ({
tool,
decision: await policyService.decide(policyInputForTool({ session, tool })),
})));
return decisions
.filter(({ decision }) => decision.allowed || decision.decision === "require_approval")
.map(({ tool }) => tool);
}
async function executeVirtualSearchTools(session: ToolGatewaySession, parameters: unknown) {
const params = asRecord(parameters) ?? {};
const query = typeof params.query === "string" ? params.query.trim().toLowerCase() : "";
const limit = Math.max(1, Math.min(50, Number(params.limit ?? 10) || 10));
const tools = (await searchableOnDemandTools(session))
.filter((tool) => {
if (!query) return true;
return [
tool.name,
tool.displayName,
tool.description,
tool.applicationKey,
tool.upstreamToolName,
].filter((value): value is string => typeof value === "string")
.some((value) => value.toLowerCase().includes(query));
})
.slice(0, limit)
.map((tool) => ({
name: tool.name,
displayName: tool.displayName ?? tool.name,
description: tool.description ?? null,
parametersSchema: tool.parametersSchema,
applicationId: tool.applicationId ?? null,
connectionId: tool.connectionId ?? null,
catalogEntryId: tool.catalogEntryId ?? null,
upstreamToolName: tool.upstreamToolName ?? tool.name,View on GitHub (pinned to 01ad858492)
Solutions
- Provide issueId explicitly when the session is not bound to an issue.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/src/services/tool-gateway.ts:2050 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18).
Data as JSON: /api/errors/33500c78c7a303d4.
Report an issue: GitHub.