{"record":{"id":"b36b5e1f48bdfdf9","repo":"can1357/oh-my-pi","slug":"commit-agent-did-not-provide-changelog-entries","errorCode":null,"errorMessage":"Commit agent did not provide changelog entries.","messagePattern":"Commit agent did not provide changelog entries\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/commit/agentic/index.ts","lineNumber":206,"sourceCode":"\tctx: CommitExecutionContext & {\n\t\tnoChangelog: boolean;\n\t\tchangelogTargets: string[];\n\t\tnumstat: NumstatEntry[];\n\t},\n): Promise<boolean> {\n\tlet usedFallback = false;\n\tif (!commitState.proposal && !commitState.splitProposal) {\n\t\tif ($env.PI_COMMIT_NO_FALLBACK?.toLowerCase() !== \"true\") {\n\t\t\tprocess.stdout.write(\"● Agent did not provide proposal, using fallback...\\n\");\n\t\t\tcommitState.proposal = generateFallbackProposal(ctx.numstat);\n\t\t\tusedFallback = true;\n\t\t}\n\t}\n\n\tlet updatedChangelogFiles: string[] = [];\n\tif (!ctx.noChangelog && ctx.changelogTargets.length > 0 && !usedFallback) {\n\t\tif (!commitState.changelogProposal) {\n\t\t\tthrow new Error(\"Commit agent did not provide changelog entries.\");\n\t\t}\n\t\tprocess.stdout.write(\"● Applying changelog entries...\\n\");\n\t\tconst updated = await applyChangelogProposals({\n\t\t\tcwd: ctx.cwd,\n\t\t\tproposals: commitState.changelogProposal.entries,\n\t\t\tdryRun: ctx.dryRun,\n\t\t\tonProgress: message => {\n\t\t\t\tprocess.stdout.write(`  ├─ ${message}\\n`);\n\t\t\t},\n\t\t});\n\t\tupdatedChangelogFiles = updated.map(filePath => path.relative(ctx.cwd, filePath));\n\t\tif (updated.length > 0) {\n\t\t\tfor (const filePath of updated) {\n\t\t\t\tprocess.stdout.write(`  └─ ${filePath}\\n`);\n\t\t\t}\n\t\t} else {\n\t\t\tprocess.stdout.write(\"  └─ (no changes)\\n\");\n\t\t}","sourceCodeStart":188,"sourceCodeEnd":224,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/commit/agentic/index.ts#L188-L224","documentation":"When the agentic commit flow is configured to update the changelog (changelog targets exist and no fallback or no-changelog opt-out), the commit agent's final state must include a changelogProposal. If the agent finished without producing entries, completeAgentCommitState throws to prevent silently skipping the required changelog update.","triggerScenarios":"The commit agent's response omitted the changelog proposal (model returned no entries or malformed final output) while the repo has CHANGELOG targets and the run did not set noChangelog or use the fallback path.","commonSituations":"Model under-following structured-output instructions; a repo requiring changelog updates whose CHANGELOG.md exists but the agent decided nothing changed; prompt/agent-version drift changing the proposal schema.","solutions":["Re-run the agentic commit (often a transient model omission) and inspect the agent's final message for changelog output","Pass the no-changelog opt-out for the commit if entries genuinely are not needed, so the requirement is explicitly waived","Verify the repo's changelog targets are correct (the requirement only triggers when targets exist) and that the agent prompt/tooling version matches the expected proposal schema"],"exampleFix":"// before (agent produced no proposal for a repo that requires changelog updates)\nthrow new Error(\"Commit agent did not provide changelog entries.\")\n// after (explicitly waive when no entries are warranted)\nomp commit --no-changelog","handlingStrategy":"try-catch","validationCode":"if (!ctx.noChangelog && ctx.changelogTargets.length > 0 && !usedFallback && !commitState.changelogProposal) {\n  throw new Error('Agent finished without changelog entries; re-run or pass --no-changelog.');\n}","typeGuard":"function hasChangelogProposal(state) {\n  return !!state?.changelogProposal && Array.isArray(state.changelogProposal.entries);\n}","tryCatchPattern":"try {\n  await runAgenticCommit(ctx);\n} catch (err) {\n  if (err instanceof Error && err.message.includes('changelog entries')) {\n    logger.warn('Commit agent omitted changelog entries; retrying or falling back to manual edit');\n    // retry once, or update CHANGELOG.md by hand before committing\n  } else throw err;\n}","preventionTips":["Keep the repo's CHANGELOG.md [Unreleased] section well-formed so the agent has a clear target","Re-run the commit when the agent omits entries — it is often a transient model miss","Use the explicit no-changelog opt-out when no entries are warranted, so the invariant is never silently violated"],"tags":["agent","changelog","state"],"backgroundTag":"agent-output-validation-failed","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}