{"record":{"id":"1502dc393db2a861","repo":"can1357/oh-my-pi","slug":"conflict-has-nothing-to-resolve-no-conflic","errorCode":null,"errorMessage":"`conflict://*` has nothing to resolve — no conflicts are currently registered. Re-read the file(s) with conflicts first.","messagePattern":"`conflict://\\*` has nothing to resolve — no conflicts are currently registered\\. Re-read the file\\(s\\) with conflicts first\\.","errorType":"validation","errorClass":"ToolError","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/tools/write.ts","lineNumber":949,"sourceCode":"\t * ours side rather than collapsing every conflict to the first\n\t * block's ours.\n\t *\n\t * All-or-nothing semantics within a file: if any splice for a file\n\t * fails (stale anchors, missing base for `@base`, etc.), that file is\n\t * left untouched and the error is surfaced. Files that succeed are\n\t * still written. The result text reports per-file counts so the agent\n\t * can re-read the failed files and retry.\n\t */\n\tasync #resolveAllConflicts(\n\t\treplacementContent: string,\n\t\tstripped: boolean,\n\t\tsignal: AbortSignal | undefined,\n\t\trawContent: string = replacementContent,\n\t): Promise<AgentToolResult<WriteToolDetails>> {\n\t\tconst history = getConflictHistory(this.session);\n\t\tconst allEntries = history.entries();\n\t\tif (allEntries.length === 0) {\n\t\t\tthrow new ToolError(\n\t\t\t\t\"`conflict://*` has nothing to resolve — no conflicts are currently registered. Re-read the file(s) with conflicts first.\",\n\t\t\t);\n\t\t}\n\n\t\t// Per-id directive mode: content made solely of `<id>: @side` lines\n\t\t// resolves each listed conflict with that side in one call. Ideal for\n\t\t// merge-hell files where dozens of pick-one blocks each need their own\n\t\t// winner — one call instead of one write per conflict. Parsed from the\n\t\t// PRE-strip content: hashline prefix stripping would otherwise eat the\n\t\t// `<id>: ` heads as echoed line numbers.\n\t\tconst directives = resolveBulkDirectives(rawContent, replacementContent);\n\t\tif (directives) {\n\t\t\tconst known = new Set(allEntries.map(entry => entry.id));\n\t\t\tconst unknown = [...directives.keys()].filter(id => !known.has(id));\n\t\t\tif (unknown.length > 0) {\n\t\t\t\tthrow new ToolError(\n\t\t\t\t\t`Bulk directive references unknown conflict id(s) ${unknown.map(id => `#${id}`).join(\", \")}. Currently registered: ${allEntries.map(e => `#${e.id}`).join(\", \")}.`,\n\t\t\t\t);","sourceCodeStart":931,"sourceCodeEnd":967,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/tools/write.ts#L931-L967","documentation":"The conflict://* bulk-resolve mode requires at least one registered conflict entry in the session's conflict history. If `read` never surfaced any conflict markers (so nothing was registered), the wildcard resolve is a no-op and the tool throws this ToolError instead.","triggerScenarios":"Calling write with path conflict://* when the conflict history is empty — no file was read with conflict markers, or all previously registered conflicts were already resolved.","commonSituations":"Agent assumes conflicts exist without reading the files first; a retry loop after all conflicts were resolved in the previous attempt; running the bulk resolve in a fresh session where prior conflicts were never registered.","solutions":["Re-read the conflicted file(s) with `read` so the marker blocks register conflict entries.","If all conflicts were already resolved, skip the conflict://* call entirely.","Verify the file actually contains conflict markers (<<<<<<< / ======= / >>>>>>>) before reading for conflicts."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const hasMarkers = (await Bun.file(p).text()).includes(\"<<<<<<<\");\nif (!hasMarkers) throw new Error(\"No conflict markers in file; conflict://* will fail\");","typeGuard":null,"tryCatchPattern":"try {\n  await write(\"conflict://*\", directives);\n} catch (err) {\n  if (String(err.message).includes(\"nothing to resolve\")) {\n    // no conflicts registered — re-read or skip\n  }\n  throw err;\n}","preventionTips":["Always `read` the conflicted file before attempting conflict://* resolution.","Check for conflict marker tokens (<<<<<<<) before invoking bulk resolve.","Skip the resolve step entirely when no conflicts were reported by read."],"tags":["conflict-resolution","empty-state","bulk-resolve"],"backgroundTag":"nothing-to-resolve","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}