GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore: sync upstream v1.3.15 by terisuke · Pull Request #67 · Cor-Incorporated/opencode

Conversation

@terisuke

@terisuke terisuke commented Apr 5, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

What

Sync upstream anomalyco/opencode changes into fork (v1.3.13 → post-v1.3.15).

Why

Fork's dev build (0.0.0-dev) can't auto-update because Installation.method() returns "unknown".
The only way to stay current is via git merge from upstream.

Closes #66

Changes

Upstream commits merged (workflows excluded):

  • release: v1.3.14 + release: v1.3.15
  • fix(npm): Arborist reify fails on compiled binary (fix(npm): Arborist reify fails on compiled binary — Bun pre-resolves node-gyp path at build time anomalyco/opencode#21040)
  • fix: ensure reasoning tokens aren't double counted (fix: ensure reasoning tokens arent double counted when calculating usage anomalyco/opencode#21047)
  • refactor(effect): move read tool onto defineEffect (refactor(effect): move read tool onto defineEffect anomalyco/opencode#21016)
  • feat(tui): show console-managed providers (feat(tui): show console-managed providers anomalyco/opencode#20956)
  • test: add regression test for double counting bug (test: add regression test for double counting bug anomalyco/opencode#21053)
  • Various chore/generate updates

Test plan

  • bun test passes with no regressions
  • Fork-specific features (memory system, GLM fix, notifications) work
  • Typecheck passes
  • Build produces working binary

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
kitlangton and others added 15 commits April 3, 2026 22:47
@kitlangton
fix(ci): create JUnit output dirs before tests (anomalyco#20959)
00fa68b
opencode
release: v1.3.14
cc50b77
@Yuxin-Dong dongyuxin
@rekram1-node opencode
refactor: remove redundant Kimi skill section (anomalyco#20393)
c08fa56
Co-authored-by: dongyuxin <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>
@thdxr
fix(npm): Arborist reify fails on compiled binary — Bun pre-resolves …
629e866
…node-gyp path at build time (anomalyco#21040)
opencode
release: v1.3.15
930e94a
@rekram1-node
fix: ensure reasoning tokens arent double counted when calculating us…
280eb16
…age (anomalyco#21047)
@kitlangton
feat(tui): show console-managed providers (anomalyco#20956)
6ea108a
@kitlangton
refactor(effect): move read tool onto defineEffect (anomalyco#21016)
c796b9a
@opencode-agent
chore: generate
9856636
@kitlangton
fix(tui): only show org switch affordances when useful (anomalyco#21054)
c6ebc7f
@opencode-agent
chore: generate
6253ef0
@rekram1-node
test: add regression test for double counting bug (anomalyco#21053)
8b8d4fa
@fwang
doc: udpate doc
66b4e5e
@rekram1-node
tweak: add newline between <content> and first line of read tool outp…
3a0e00d
…ut to prevent confusion (anomalyco#21070)
@github-actions
chore: sync upstream changes (excluding workflows)
44d2b11
Copilot AI review requested due to automatic review settings April 5, 2026 08:54
@github-actions github-actions Bot added the needs:compliance label Apr 5, 2026
@github-actions

github-actions Bot commented Apr 5, 2026

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Copilot started reviewing on behalf of terisuke April 5, 2026 08:54
View session
Copilot AI reviewed Apr 5, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Syncs the fork with upstream opencode through v1.3.15, updating package versions and integrating upstream changes such as Console org switching APIs/UI and the Effect-based read tool refactor.

Changes:

  • Bump workspace/package versions to 1.3.15 (incl. extensions + lockfile).
  • Add experimental Console endpoints + SDK bindings, and wire Console org/provider state into the TUI (including org switching dialog).
  • Migrate tool.read implementation/tests to the Effect service graph and update ToolRegistry dependencies.

Reviewed changes

Copilot reviewed 46 out of 47 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
sdks/vscode/package.json VS Code extension version bump to 1.3.15.
packages/web/src/content/docs/zen.mdx Removes MiMo free model references from docs/pricing tables.
packages/web/package.json Web package version bump to 1.3.15.
packages/util/package.json Util package version bump to 1.3.15.
packages/ui/package.json UI package version bump to 1.3.15.
packages/slack/package.json Slack package version bump to 1.3.15.
packages/sdk/openapi.json Adds experimental Console endpoints to OpenAPI spec.
packages/sdk/js/src/v2/gen/types.gen.ts Adds generated types for new Console endpoints.
packages/sdk/js/src/v2/gen/sdk.gen.ts Adds generated client methods for Console endpoints and repositions Tool client.
packages/sdk/js/package.json SDK JS package version bump to 1.3.15.
packages/plugin/package.json Plugin package version bump to 1.3.15.
packages/opencode/test/tool/read.test.ts Refactors read tool tests to Effect-based harness/layers.
packages/opencode/test/session/compaction.test.ts Expands tests for reasoning token separation and cost calculation.
packages/opencode/test/config/config.test.ts Updates mocks to include new Account.activeOrg() behavior.
packages/opencode/src/tool/registry.ts Adds required layers/services for effectified tools (ReadTool deps).
packages/opencode/src/tool/read.ts Migrates ReadTool to Tool.defineEffect, using AppFileSystem/LSP/Instruction services.
packages/opencode/src/tool/external-directory.ts Adds Effect wrapper + switches normalization helpers to AppFileSystem.
packages/opencode/src/session/prompt/kimi.txt Removes “Skills” section content from Kimi prompt template.
packages/opencode/src/session/index.ts Adjusts usage accounting to separate reasoning vs output tokens.
packages/opencode/src/server/routes/experimental.ts Adds /experimental/console endpoints (get/list orgs/switch org).
packages/opencode/src/npm/index.ts Sets Arborist ignoreScripts: true (safer installs).
packages/opencode/src/filesystem/index.ts Improves Windows path normalization + adds normalizePathPattern.
packages/opencode/src/config/console-state.ts Introduces ConsoleState schema + empty default.
packages/opencode/src/config/config.ts Tracks console-managed providers + active org name in Config state; adds getter.
packages/opencode/src/cli/cmd/tui/util/provider-origin.ts Adds labeling/helpers for Console-managed providers.
packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx Adds categoryView rendering for richer category headers.
packages/opencode/src/cli/cmd/tui/context/sync.tsx Fetches Console state via SDK and stores it in sync context.
packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx Displays Console org + managed-provider indicator in prompt header; triggers org switch command.
packages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx Shows Console-managed providers in connect dialog with icon/footer; blocks selection.
packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx Labels providers with Console-managed indicator in model dialog.
packages/opencode/src/cli/cmd/tui/component/dialog-console-org.tsx Adds org-switching dialog calling new experimental endpoints.
packages/opencode/src/cli/cmd/tui/app.tsx Adds “Switch org” command when multiple orgs are available.
packages/opencode/src/account/index.ts Adds activeOrg() + changes org listing behavior to be more fault-tolerant.
packages/opencode/specs/effect-migration.md Documents the transitional defineEffect pattern; marks read.ts migrated.
packages/opencode/script/build.ts Marks node-gyp as external for build.
packages/opencode/package.json Core opencode package version bump to 1.3.15.
packages/function/package.json Function package version bump to 1.3.15.
packages/extensions/zed/extension.toml Zed extension version + release asset URLs updated to v1.3.15.
packages/enterprise/package.json Enterprise package version bump to 1.3.15.
packages/desktop/package.json Desktop package version bump to 1.3.15.
packages/desktop-electron/package.json Desktop Electron package version bump to 1.3.15.
packages/console/mail/package.json Console mail package version bump to 1.3.15.
packages/console/function/package.json Console function package version bump to 1.3.15.
packages/console/core/package.json Console core package version bump to 1.3.15.
packages/console/app/package.json Console app package version bump to 1.3.15.
packages/app/package.json App package version bump to 1.3.15.
bun.lock Lockfile updated for version bumps across workspace packages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/sdk/openapi.json
Comment on lines +1273 to +1277
"x-codeSamples": [
{
"lang": "js",
"source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
}

Copilot AI Apr 5, 2026

Copy link

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The x-codeSamples JS snippet is syntactically invalid: the import string is missing the closing quote after @opencode-ai/sdk (and the newline is inside the string). This will break generated docs/examples. Update the sample to a valid import (e.g. from "@opencode-ai/sdk") and keep newlines outside the string.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Copilot uses AI. Check for mistakes.
Comment thread packages/sdk/openapi.json
Comment on lines +1344 to +1348
"x-codeSamples": [
{
"lang": "js",
"source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
}

Copilot AI Apr 5, 2026

Copy link

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The x-codeSamples JS snippet for experimental.console.listOrgs is syntactically invalid (missing closing quote in the import path, newline embedded in the string). Please fix the example string so it produces valid JS when rendered/copied.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Copilot uses AI. Check for mistakes.
Comment thread packages/sdk/openapi.json
Comment on lines +1385 to +1402
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"accountID": {
"type": "string"
},
"orgID": {
"type": "string"
}
},
"required": ["accountID", "orgID"]
}
}
}
},

Copilot AI Apr 5, 2026

Copy link

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/experimental/console/switch validates a JSON body with required accountID and orgID, but the OpenAPI requestBody is not marked as required. This causes generated clients to treat the body as optional and can lead to runtime 400s. Mark the requestBody as required (or adjust the route/validator if the body is truly optional).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Copilot uses AI. Check for mistakes.
Comment thread packages/sdk/openapi.json
Comment on lines +1403 to +1407
"x-codeSamples": [
{
"lang": "js",
"source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
}

Copilot AI Apr 5, 2026

Copy link

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The x-codeSamples JS snippet for experimental.console.switchOrg is syntactically invalid (missing closing quote in the import path, newline embedded in the string). Fixing this in the OpenAPI spec will keep generated docs/examples usable.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Copilot uses AI. Check for mistakes.
Comment thread packages/sdk/js/src/v2/gen/sdk.gen.ts
Comment on lines +1053 to +1059
public switchOrg<ThrowOnError extends boolean = false>(
parameters?: {
directory?: string
workspace?: string
accountID?: string
orgID?: string
},

Copilot AI Apr 5, 2026

Copy link

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Console.switchOrg() takes accountID/orgID as optional parameters, but the server route requires both fields (and the OpenAPI schema marks them required). The SDK method signature should require these fields so callers can’t accidentally invoke it with an invalid body.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Copilot uses AI. Check for mistakes.
Comment thread packages/opencode/src/tool/read.ts
Comment on lines +99 to +104
const stat = yield* fs.stat(filepath).pipe(
Effect.catchIf(
(err) => "reason" in err && err.reason._tag === "NotFound",
() => Effect.succeed(undefined),
),
)

Copilot AI Apr 5, 2026

Copy link

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Effect.catchIf predicate uses "reason" in err without first verifying err is a non-null object. If a non-object is ever thrown/rejected, this predicate will itself throw a TypeError and mask the original error. Use a safer guard (similar to packages/opencode/src/storage/storage.ts:71-77) before using the in operator / accessing err.reason.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Copilot uses AI. Check for mistakes.
Comment thread packages/opencode/src/account/index.ts
Comment on lines 302 to 312
const orgsByAccount = Effect.fn("Account.orgsByAccount")(function* () {
const accounts = yield* repo.list()
const [errors, results] = yield* Effect.partition(
return yield* Effect.forEach(
accounts,
(account) => orgs(account.id).pipe(Effect.map((orgs) => ({ account, orgs }))),
(account) =>
orgs(account.id).pipe(
Effect.catch(() => Effect.succeed([] as readonly Org[])),
Effect.map((orgs) => ({ account, orgs })),
),
{ concurrency: 3 },
)

Copilot AI Apr 5, 2026

Copy link

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

orgsByAccount() now swallows all per-account errors and returns an empty org list with no logging. This makes auth/network/config issues indistinguishable from “no orgs” and will also skew switchableOrgCount. Consider at least logging a warning (and ideally preserving the previous behavior of surfacing/collecting errors) when an account’s org fetch fails.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Copilot uses AI. Check for mistakes.
Comment thread packages/opencode/src/session/index.ts
total,
input: adjustedInputTokens,
output: outputTokens,
output: outputTokens - reasoningTokens,

Copilot AI Apr 5, 2026

Copy link

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

output is computed as outputTokens - reasoningTokens without clamping. If a provider reports reasoning tokens separately (i.e. not included in outputTokens) or ever reports reasoningTokens > outputTokens, this becomes negative and will undercount cost. Consider guarding with Math.max(0, outputTokens - reasoningTokens) (or enforce/validate the invariant before subtracting).

Suggested change
output: outputTokens - reasoningTokens,
output: Math.max(0, outputTokens - reasoningTokens),

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Copilot uses AI. Check for mistakes.
Comment thread packages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx
Comment on lines +50 to +59
footer: consoleManaged ? sync.data.console_state.activeOrgName : undefined,
category: provider.id in PROVIDER_PRIORITY ? "Popular" : "Other",
gutter: consoleManaged ? (
<text fg={theme.textMuted}>{CONSOLE_MANAGED_ICON}</text>
) : connected ? (
<text fg={theme.success}>✓</text>
) : undefined,
async onSelect() {
if (consoleManaged) return

Copilot AI Apr 5, 2026

Copy link

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Selecting a Console-managed provider currently becomes a no-op (if (consoleManaged) return) while the option remains enabled. In the “Connect a provider” dialog this results in user-visible broken behavior (selection does nothing). Consider marking these options as disabled: true (with an explanatory description) or handling selection by showing a dialog explaining it’s managed via Console / taking the user to org switching.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Copilot uses AI. Check for mistakes.
terisuke and others added 2 commits April 5, 2026 18:02
@terisuke @claude
chore(guardrails): use workspace:* for opencode dep, fix upstream-syn…
98b4919
…c workflow

- Change opencode dependency from fixed "1.3.13" to "workspace:*" so
  upstream version bumps don't break bun install
- Bump guardrails version to 1.3.15
- Fix upstream-sync workflow: detect merge conflicts properly, graceful
  fallback when PR creation lacks permissions

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@terisuke @claude
chore(guardrails): update test assertion for workspace:* opencode dep…
09d2a9c
…endency

The guardrails package now uses workspace:* instead of a pinned version
to prevent bun install failures when upstream bumps the version.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@terisuke

terisuke commented Apr 5, 2026

Copy link
Copy Markdown
Author

Codex CLI セカンドオピニオンレビュー結果 (2026-04-05)

ドリフトチェック

フォーク独自の変更はIssueに対応する内容のみ(memory system, GLM fix, notifications, CI fixes)。
ただし upstream merge 由来の out-of-scope 変更(console/org-switching, tooling refactors)が含まれる — これは upstream 側の変更であり意図的に取り込んでいる。

Codex 検出 → コード検証結果

Finding Codex判定 検証結果 対応
npm ignoreScripts 削除 HIGH FALSE — ignoreScripts: true は npm/index.ts:67,108 に存在 対応不要(誤検出)
non-macOS notification focus MEDIUM TRUE — notification/index.ts:48 Issue #68
parseFrontmatter 型バリデーション LOW TRUE — memory/file.ts:41 Issue #69
repetition test 重複 LOW TRUE — repetition.test.ts:8-23 Issue #69
Token double-counting MEDIUM RESOLVED — upstream anomalyco#21047/anomalyco#21053 がこの sync に含まれる 対応不要

PR #67 Copilot レビュー指摘 (9件)

全てupstreamコード(sdk/openapi.json, sdk.gen.ts, read.ts, dialog-provider.tsx, session/index.ts, account/index.ts)への指摘。
フォーク側で修正すべきものではなく、upstream に報告すべき内容。
CRITICAL/HIGH 指摘はゼロ。

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@terisuke terisuke mentioned this pull request Apr 5, 2026
[Master Plan] OpenCode Claude Code Parity — 実装ロードマップ #51
Closed
4 tasks
@terisuke
terisuke merged commit e04eef8 into dev Apr 5, 2026
2 of 5 checks passed

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

needs:compliance

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

chore: upstream sync to v1.3.15 — fix auto-update incompatibility

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@terisuke @kitlangton @Yuxin-Dong @thdxr @rekram1-node @fwang
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.