can1357/oh-my-pi · warning · Error
${base}${grounding}${hint ? `\n${hint}` : ""} (no-op: e.g. "
Error message
${base}${grounding}${hint ? `\n${hint}` : ""} (no-op: e.g. "Edits to ${context.path} made no change." / "Operation ${operationNumber} makes no change to ${context.path}." / "Operation ${operationNumber} ${OPENER}* matched ${matchCount} occurrences but all make no change to ${context.path}." plus grounding about whitespace-normalized rewrite) What it means
The sloppy apply path reports a no-op: an operation matched (or had no concrete match count) but its rewrite normalizes to text identical to what is already in the file, so nothing changed. The error includes the base message plus grounding — a numbered preview of current file content near the closest match — and an optional hint, so the model/author can see why the edit is a no-op and adjust the REWRITE's whitespace or content.
Source
Thrown at packages/coding-agent/src/edit/sloppy.ts:3535
preview?: { content: string; offset: number },
matchCount?: number,
hint?: string,
): never => {
const previous = noOpByPath.get(context.path);
const count = previous?.hash === hash ? previous.count + 1 : 1;
noOpByPath.set(context.path, { hash, count });
const base =
count >= 3
? `STOP: identical no-op repeated ${count} times for ${context.path}. Re-read current code and send a changed payload, or move on.`
: operationNumber === undefined
? `Edits to ${context.path} made no change.`
: matchCount === undefined
? `Operation ${operationNumber} makes no change to ${context.path}.`
: `Operation ${operationNumber} ${OPENER}* matched ${matchCount} occurrences but all make no change to ${context.path}.`;
const grounding = preview
? `\nYour rewrite normalized to text identical to these lines. Indentation-only changes are applied verbatim; adjust the authored REWRITE if another whitespace change was intended.\nCurrent file content near the closest match (no re-read needed):\n${numberedPreview(preview.content, preview.offset)}`
: "";
throw new Error(base + grounding + (hint ? `\n${hint}` : ""));
};
let operations: Operation[];
try {
operations = parseOperations(input, content);
} catch (error) {
if (!(error instanceof Error)) throw error;
// A parse error that already carries a copy-ready payload (e.g. the
// fill-in skeleton) must not be followed by an echo of the broken input.
if (error.message.includes("Copy-ready corrected payload")) throw error;
const normalizedPayload = normalizeInput(input);
const retry =
parseOpener(normalizedPayload.split("\n")[0] ?? "") === false
? `${OPENER}\n${normalizedPayload}`
: normalizedPayload;
throw new Error(`${error.message}\nCopy-ready corrected payload:\n${retry}`);
}
const removedByOperation: Array<string | undefined> = [];View on GitHub (pinned to 9690622007)
Solutions
- Modify the REWRITE to make an actual content change beyond whitespace, or drop the operation if no change is needed.
- Compare the numbered preview in the error against the intended final text and adjust indentation deliberately (indentation-only changes are applied verbatim, so write the exact indentation intended).
- Re-read the file region and re-author the PATTERN/REWRITE pair against current content.
Example fix
// before (REWRITE identical to file apart from intent) ==== const value = compute(); // after (real change) ==== const value = compute(value) as number;
Defensive patterns
Strategy: retry
Validate before calling
function isNoOp(rewrite: string, fileLines: string[]): boolean {
const normalize = (s: string) => s.split("\n").map(l => l.trim()).join("\n");
return fileLines.some((_, i) =>
normalize(fileLines.slice(i, i + rewrite.split("\n").length).join("\n")) === normalize(rewrite));
} Try / catch
try {
applySloppyEdit(payload);
} catch (err) {
if (err instanceof Error && err.message.includes("makes no change")) {
const preview = err.message.split("no re-read needed):\n")[1];
payload = reauthorRewriteWithRealChange(payload, preview);
applySloppyEdit(payload);
} else throw err;
} Prevention
- Diff intended REWRITE against the actual file region before submitting
- Skip no-op operations entirely instead of re-applying a completed edit
- Remember whitespace-normalized equality counts as no change; adjust indentation deliberately if that was the intent
When it happens
Trigger: applySloppyEdit where every located candidate's edit produces zero changes because the authored REWRITE, after whitespace normalization, equals the existing lines at the match.
Common situations: Indentation-only 'fixes' that already match the file; repeated application of the same edit after it succeeded once; model re-emitting the current file content as the rewrite.
Related errors
- OMP_AUTH_BROKER_ACCOUNT_POOL_FILE contains a provider id wit
- Operation ${operationNumber} adds or removes whole lines but
- Operation ${operationNumber} has selection markers in REWRIT
- Operation ${operationNumber} REWRITE has a whole-line ${GAP}
- ${REWRITE_HEADER}${reference[1]} must reference an earlier d
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/0f8a1643d494a0d5.
Report an issue: GitHub.