paperclipai/paperclip · error · Error

Feedback trace bundle ${traceId} not found

Error message

Feedback trace bundle ${traceId} not found

What it means

fetchFeedbackTraceBundle GETs /api/feedback-traces/{traceId}/bundle and throws when the client returns null, i.e., the trace id has no bundle.

Source

Thrown at cli/src/commands/client/feedback.ts:265

export async function fetchCompanyFeedbackTraces(
  ctx: ResolvedClientContext,
  companyId: string,
  opts: FeedbackFilterOptions,
): Promise<FeedbackTrace[]> {
  return (
    (await ctx.api.get<FeedbackTrace[]>(
      `${apiPath`/api/companies/${companyId}/feedback-traces`}${buildFeedbackTraceQuery(opts, true)}`,
    )) ?? []
  );
}

export async function fetchFeedbackTraceBundle(
  ctx: ResolvedClientContext,
  traceId: string,
): Promise<FeedbackTraceBundle> {
  const bundle = await ctx.api.get<FeedbackTraceBundle>(apiPath`/api/feedback-traces/${traceId}/bundle`);
  if (!bundle) {
    throw new Error(`Feedback trace bundle ${traceId} not found`);
  }
  return bundle;
}

export function summarizeFeedbackTraces(traces: FeedbackTrace[]): FeedbackSummary {
  const statuses: Record<string, number> = {};
  let thumbsUp = 0;
  let thumbsDown = 0;
  let withReason = 0;

  for (const trace of traces) {
    if (trace.vote === "up") thumbsUp += 1;
    if (trace.vote === "down") thumbsDown += 1;
    if (readFeedbackReason(trace)) withReason += 1;
    statuses[trace.status] = (statuses[trace.status] ?? 0) + 1;
  }

  return {

View on GitHub (pinned to 67001ec6eb)

Solutions

  1. List traces first (GET /api/companies/{id}/feedback-traces) and copy the exact id.
  2. Confirm you are talking to the same instance that produced the trace.
  3. Check retention settings if traces are being pruned.
Defensive patterns

Strategy: try-catch

Validate before calling

const traces = (await ctx.api.get(`/api/companies/${companyId}/feedback-traces`)) ?? [];
const exists = traces.some((t) => t.id === traceId);
if (!exists) throw new Error(`Feedback trace ${traceId} not found`);

Type guard

const isFeedbackTraceBundle = (v: unknown): v is FeedbackTraceBundle =>
  !!v && typeof v === 'object' && 'trace' in (v as any);

Try / catch

try {
  const bundle = await ctx.api.get(`/api/feedback-traces/${traceId}/bundle`);
  if (!bundle) throw new Error(`Feedback trace bundle ${traceId} not found`);
} catch (err) {
  // list traces, surface correct ids, then retry with a verified id
}

Prevention

When it happens

Trigger: Requesting a bundle with a wrong, expired, or pruned trace id.

Common situations: Copy-paste typo in the trace id; trace aged out of retention; cross-instance id mismatch.

Related errors


AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12). Data as JSON: /api/errors/85cb6470d4c79cb3. Report an issue: GitHub.