anomalyco / anomalyco/opencode

[FEATURE]: Add generation completion sentinels

Open
#41,425 0 comments 0 reactions 1 assignee View on GitHub

@kitlangton is already working on this.

Since Aug 9, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Feature hasn't been suggested before.
  • I checked that there is no active issue. This replaces #25921, which was closed as stale.
Describe the enhancement you want to request

I previously opened #25921 and #25924 for this. The PR passed its checks, and I have kept the branch rebased against dev since then. Automated cleanup closed the PR before a maintainer reviewed it, and the issue was later closed for inactivity.

Current dev still has the same problem. script/generate.ts and packages/sdk/js/script/build.ts can produce a lot of output, but neither prints a clear final success line. If an agent or tool truncates the output, I cannot tell whether generation finished.

The change would stay small:

await $`bun ./packages/sdk/js/script/build.ts`;
console.log("opencode generate: sdk build complete");

await $`bun dev generate > ../sdk/openapi.json`.cwd("packages/opencode");
console.log("opencode generate: openapi export complete");

await $`./script/format.ts`;
console.log("opencode generate: format complete");
console.log("opencode generate complete");
  • add logs only after successful steps
  • add opencode sdk js build complete to the SDK script because it is also run directly
  • leave packages/opencode/src/cli/cmd/generate.ts unchanged because its stdout is redirected to openapi.json

I still think this is worth implementing. I have been keeping branch linked in #25924 continuously maintained and updated against dev, so you can check that out for my reference implementation.

Process: human-directed and reviewed, with agentic assistance from openai/gpt-5.6-sol/high.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.