can1357/oh-my-pi · error · Error

Commit agent did not provide a proposal.

Error message

Commit agent did not provide a proposal.

What it means

completeAgentCommitState() throws this when the commit agent's state ends up with neither a single CommitProposal nor a SplitCommitProposal, and the fallback path was disabled (PI_COMMIT_NO_FALLBACK=true) or did not run. Normally a missing proposal triggers generateFallbackProposal() from numstat; this error surfaces only when fallback is suppressed. It is a guard against proceeding with no commit content.

Source

Thrown at packages/coding-agent/src/commit/agentic/index.ts:242

		}
	}

	if (commitState.proposal) {
		await runSingleCommit(commitState.proposal, ctx);
		return usedFallback;
	}

	if (commitState.splitProposal) {
		await runSplitCommit(commitState.splitProposal, {
			cwd: ctx.cwd,
			dryRun: ctx.dryRun,
			push: ctx.push,
			additionalFiles: updatedChangelogFiles,
		});
		return usedFallback;
	}

	throw new Error("Commit agent did not provide a proposal.");
}

async function runSingleCommit(proposal: CommitProposal, ctx: CommitExecutionContext): Promise<void> {
	const repo = vcs.requireGit(ctx.cwd);
	if (proposal.warnings.length > 0) {
		process.stdout.write(formatWarnings(proposal.warnings));
	}
	const commitMessage = formatCommitMessage(proposal.analysis, proposal.summary);
	if (ctx.dryRun) {
		process.stdout.write("\nGenerated commit message:\n");
		process.stdout.write(`${commitMessage}\n`);
		return;
	}
	process.stdout.write("● Creating commit...\n");
	try {
		await repo.commitCreate(commitMessage, {});
	} catch (error) {
		if (vcs.isVcsError(error)) abortOnGitFailure("Commit failed", error);

View on GitHub (pinned to 9690622007)

Solutions

  1. Unset PI_COMMIT_NO_FALLBACK (or set it to anything other than "true") so generateFallbackProposal() can synthesize a commit from numstat
  2. Re-run the commit; LLM proposal failures are often transient
  3. Check the agent/provider logs for why no proposal was parsed (e.g. stopReason === "error" earlier in the run)
  4. Commit manually with a conventional message if the automation keeps failing

Example fix

// before
PI_COMMIT_NO_FALLBACK=true omp commit
// after
unset PI_COMMIT_NO_FALLBACK && omp commit
Defensive patterns

Strategy: fallback

Validate before calling

if (!commitState.proposal && !commitState.splitProposal && process.env.PI_COMMIT_NO_FALLBACK === "true") {
  throw new Error("No commit proposal and fallback disabled");
}

Type guard

function hasProposal(state: CommitAgentState): boolean {
  return Boolean(state.proposal ?? state.splitProposal);
}

Try / catch

try {
  await runAgenticCommit(args);
} catch (err) {
  if (err.message.includes("did not provide a proposal")) {
    console.error("Agent produced no proposal; run with fallback enabled or commit manually.");
  } else throw err;
}

Prevention

When it happens

Trigger: The agent LLM returns no proposal/splitProposal (malformed output, parse failure) while PI_COMMIT_NO_FALLBACK=true, so line 195-201 cannot populate commitState.proposal and execution falls through to the throw at line 242.

Common situations: Running the agentic commit flow with fallback disabled in CI; the model produces unparseable or empty structured output for the proposal; a provider error mid-agent leaves the state partially filled (e.g. changelog only).

Related errors


AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31). Data as JSON: /api/errors/19be4b6223a86921. Report an issue: GitHub.