deepseek-ai/deepseek-harness · error
[web-runtime] lineage cycle at ${s.sessionId}; emitting as r
Error message
[web-runtime] lineage cycle at ${s.sessionId}; emitting as root What it means
Error "[web-runtime] lineage cycle at ${s.sessionId}; emitting as root" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/client/runtime/src/client/sessions/lineage.ts:73
for (const s of summaries) byId.set(s.sessionId, s)
const children = new Map<SessionId, TitledSessionSummary[]>()
const roots: TitledSessionSummary[] = []
for (const s of summaries) {
if (s.parentSessionId !== undefined && byId.has(s.parentSessionId)) {
const list = children.get(s.parentSessionId) ?? []
list.push(s)
children.set(s.parentSessionId, list)
} else {
roots.push(s) // root, or an orphan whose parent is absent from summaries (degrade to root, never drop)
}
}
const out: SessionListEntry[] = []
const visited = new Set<SessionId>()
const walk = (s: TitledSessionSummary, depth: number): void => {
if (visited.has(s.sessionId)) {
console.warn(`[web-runtime] lineage cycle at ${s.sessionId}; emitting as root`)
return
}
visited.add(s.sessionId)
const pendingInteraction = pendingInteractions?.get(s.sessionId)
out.push({
...s,
...(pendingInteraction === undefined ? {} : { pendingInteraction }),
completed: completed?.has(s.sessionId) ?? false,
depth,
})
const kids = children.get(s.sessionId)
if (kids === undefined) return
for (const kid of kids) walk(kid, depth + 1)
}
for (const root of roots) walk(root, 0)
// Cycle members (unreachable from any root): emit as roots so no entry is lost.
for (const s of summaries) {
if (!visited.has(s.sessionId)) walk(s, 0)View on GitHub (pinned to b150a551b8)
Solutions
- Inspect session lineage data for a cycle at the reported sessionId and remove the circular parent reference.
When it happens
Trigger: Thrown at packages/client/runtime/src/client/sessions/lineage.ts:73 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24).
Data as JSON: /api/errors/27697537aaa86021.
Report an issue: GitHub.