I sent a small upstream PR to OpenCode's changelog script. An empty commit message could reach the model, which would ask for the missing input. That response could then be treated as a changelog entry instead of a failed summarisation.1
The proposed fix handled the boundary before asking the model to do anything:
- Trim commit messages and skip empty ones while collecting commits.
- Reject an empty message if it still reaches the summarisation function.
- Require a non-empty summary before accepting the result.
Keep missing input out of the model call
The PR described a reproduction with Claude Sonnet 4.5. The important part was not a different prompt or model choice. There was no commit message to summarise, so the script needed to decide that before making the request.
The result check was a second guard, not a guarantee that every possible model error would be detected. A non-empty response can still be wrong.
This was a contribution I proposed, rather than a fix I could claim had shipped upstream. The PR was later closed without a merge. It remains a useful example of a narrow code change around an AI step: validate the ordinary program inputs instead of asking the model to compensate for them.