DEV Community

Anton Reznik
Anton Reznik

Posted on

My First Open-Source Contributor Arrived at the Perfectly Wrong Time

A slightly awkward open-source story. Yesterday, I released a new version of opencode-costs, 1.0.3. Only after the release did I notice that someone had submitted the project’s first PR a few hours earlier.

It dealt with exactly the same problem I was fixing. After an OpenCode update, part of the API changed. I fixed the new calls, while he noticed something more important: costs should now be calculated per individual agent response, not for the whole session. Otherwise, Plan and Build can get mixed together.

I pulled in his PR, resolved the conflicts with the changes I had already made, ran the tests, and checked everything in a live OpenCode environment. Then I released 1.1.0 with both sets of changes.

It was unexpectedly nice to see that someone found your small project, understood the code, and spent time fixing it.

https://github.com/iamantonreznik/opencode-costs
https://www.npmjs.com/package/opencode-costs

Top comments (0)