bytedance/deer-flow · warning
Failed to load demo thread ${threadId}
Error message
Failed to load demo thread ${threadId} What it means
Static-demo loader: fetches /demo/threads/{threadId}/thread.json (a bundled fixture, not a gateway call) and throws when the response is not ok. The loaded fixture's thread_id is forced to the requested id and updated_at defaults to created_at.
Source
Thrown at frontend/src/core/threads/static-demo.ts:178
return sortOrder === "asc" ? aValue - bValue : bValue - aValue;
});
const offset = Math.max(0, Math.floor(params.offset ?? 0));
const limit =
typeof params.limit === "number"
? Math.max(0, Math.floor(params.limit))
: sortedThreads.length;
return sortedThreads.slice(offset, offset + limit);
}
export async function loadStaticDemoThread(
threadId: string,
): Promise<AgentThread> {
const response = await globalThis.fetch(
`/demo/threads/${encodeURIComponent(threadId)}/thread.json`,
);
if (!response.ok) {
throw new Error(`Failed to load demo thread ${threadId}`);
}
const thread = (await response.json()) as AgentThread;
return {
...thread,
thread_id: threadId,
updated_at: thread.updated_at ?? thread.created_at,
};
}
export function staticDemoThreadState(
thread: AgentThread,
): ThreadState<AgentThreadState> {
return {
values: thread.values,
next: [],
checkpoint: {
thread_id: thread.thread_id,
checkpoint_ns: "",View on GitHub (pinned to 1dd6ba1acb)
Solutions
- Open /demo/threads/<id>/thread.json directly in the browser to confirm the 404/serve failure.
- Verify the id exists in the demo thread index (the data used by the thread list in static-demo.ts).
- Ensure the static demo assets directory is deployed/served (check nginx config or Next public path).
- If the fixture was renamed, update the id in links/bookmarks or restore the file.
Defensive patterns
Strategy: try-catch
Validate before calling
const exists = demoThreadIds.includes(threadId); // from the same static index that powers the list
if (!exists) { router.replace('/demo'); } Type guard
function isKnownDemoThread(threadId: string): boolean {
return staticDemoIndex().some((t) => t.thread_id === threadId);
} Try / catch
try { thread = await loadStaticDemoThread(id); } catch { renderThreadNotFound(); return; } Prevention
- Generate the demo thread list and thread.json files from one source so ids can't drift.
- Smoke-test /demo routes in CI builds.
- Deep links into demo threads should degrade to the demo index, not a crash.
When it happens
Trigger: Requesting a demo thread id with no corresponding public/demo data file (404), the static demo mode enabled but the /demo route not served (dev server misconfig, missing copy of demo assets), or a moved/renamed thread.json in the demo dataset.
Common situations: Deep-linking to a demo thread URL after the fixture set changed; running a frontend build where /demo assets were excluded; nginx not serving the demo directory in the docker stack.
Related errors
- Failed to create side conversation.
- Failed to load thread token usage.
- Failed to branch conversation.
- Failed to update conversation.
- Failed to compact context.
AI-assisted analysis of bytedance/deer-flow@1dd6ba1acb (2026-08-14).
Data as JSON: /api/errors/121fed1e5cf5e584.
Report an issue: GitHub.