contribution/compass
anomalyco/opencode

OpenCode

602 signals · 626 observation events

Open repository ↗

The open source coding agent.

197.0K stars25.3K forksTypeScriptMITkeyword: OpenCode
PROJECT NEWS

Release, roadmap, and discussion

All news →
anomalyco/opencode

OpenCode

Coding-Agent Infrastructure
Latest stable

v1.18.18

v1.18.18
  • Core
  • Bugfixes
  • Select the Kimi system prompt correctly for official Moonshot and Kimi providers
  • Fix xhigh reasoning effort for xai models
Original release notes ↗

Publicly indicated next

  • No public prerelease or open milestone found.

Prereleases and milestones indicate public plans; they are not delivery commitments.

Observation trail

  1. discoveredinitial snapshot
  2. changedupdatedAt, metrics, assignees
  3. changedupdatedAt, metrics
  4. discoveredinitial snapshot
  5. discoveredinitial snapshot
  6. discoveredinitial snapshot
  7. discoveredinitial snapshot
  8. changedtext, updatedAt
  9. discoveredinitial snapshot
  10. discoveredinitial snapshot
  11. changedupdatedAt, metrics, state
  12. discoveredinitial snapshot
  13. changedupdatedAt
  14. discoveredinitial snapshot
  15. discoveredinitial snapshot
  16. changedtitle, text, updatedAt
  17. changedmetrics
  18. changedmetrics
  19. changedmetrics
  20. changedmetrics
  21. changedmetrics
  22. changedmetrics
  23. changedmetrics
  24. changedmetrics
  25. changedmetrics
  26. changedmetrics
  27. changedmetrics
  28. changedmetrics
  29. changedmetrics
  30. changedtext, updatedAt, state
50 shown
pull request

feat(tui): prototype tab scroll memory

## What Add an opt-in V2 TUI experiment that remembers the reading position of each open session tab and provides a direct return to the latest transcript content. Enable **Remember tab scroll** from the DevTools **Experiments** dialog. ## Before / After **Before:** Switching away from a session tab unmounted its transcript. Returning always snapped to the b

importance 2@kitlangtonopencontributorOriginal evidence ↗
pull request

fix(permission): make * not match / in wildcard patterns, add ** globstar support

### Issue for this PR Closes #28150 ### Type of change - [x] Bug fix ### What does this PR do? **Issue:** Granular read permission deny rules don't block file access. When a user configures `{ read: { "*.env": "deny", "*": "allow" } }`, the deny rule is bypassed for paths like `src/.env`. **Root cause:** Wildcard `*` was converted to regex `.*`, which matche

importance 1@lexlianclosedautomated-pr-cleanupOriginal evidence ↗
pull request

fix(opencode): preserve valid empty JSON config

### Issue for this PR Closes #36374 ### Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? Avoids adding a dangling comma when `$schema` is inserted into an empty config object. The comma is now included only when the parsed config already has keys, so `{}` remains valid strict JSON

importance 1@aditya-vithaldasclosedautomated-pr-cleanupOriginal evidence ↗
pull request

fix(tui): respect sidebar width threshold

### Issue for this PR Closes #36417 ### Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? Removes the temporary `sidebarOpen` override from the TUI session view. Sidebar visibility is now controlled by the persisted `auto` or `hide` setting and the existing terminal-width check, so

importance 1@aditya-vithaldasclosedautomated-pr-cleanupOriginal evidence ↗
pull request

feat(tui): paste clipboard on right click

### Issue for this PR Closes #36456 ### Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? Makes right-click dispatch the existing `prompt.paste` command when mouse capture is enabled and the prompt is focused. This supports clipboard text and images while preserving the experimental

importance 1@aditya-vithaldasclosedautomated-pr-cleanupOriginal evidence ↗
pull request

fix(session-ui): escape direction:rtl bidi issue in message-part-directory via LRE/PDF wraps

### Issue for this PR Closes #36489 ### Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? PR #9591 fixed a text rendering bug where `direction: rtl` + `text-overflow: ellipsis` on paths starting with a leading dot (e.g. `.config/opencode/`) causes the dot to be misplaced by the Unic

importance 1@windlandnekoclosedautomated-pr-cleanupOriginal evidence ↗
pull request

fix(web): pagefind.js missing on docs site

### Issue for this PR https://github.com/anomalyco/opencode/issues/36388 https://github.com/anomalyco/opencode/issues/17343 https://github.com/anomalyco/opencode/issues/26157#issuecomment-4402999957 Closes #36388 ### Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? Add routes.exten

importance 1@ShiftWatchOutclosedautomated-pr-cleanupOriginal evidence ↗
pull request

feat(tui): add interactive session search

### Issue for this PR Closes #4714 ### Type of change - [ ] Bug fix - [x] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? Adds interactive incremental search over the current session transcript — readline/less-style rather than a modal prompt. Press `ctrl+r` and a search bar attaches to the top of the prompt input:

importance 1@albertdbioclosedautomated-pr-cleanupOriginal evidence ↗
pull request

fix(opencode): define OPENCODE_VERSION in the node server build

### Issue for this PR Closes #30197 ### Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? The node server bundle that the desktop app ships as its sidecar is built by `script/build-node.ts`, which defines `OPENCODE_CHANNEL` but not `OPENCODE_VERSION` (the CLI build in `script/build.

importance 1@H3XDaemonclosedautomated-pr-cleanupOriginal evidence ↗
pull request

fix(opencode): add SIGKILL fallback to Process.stop()

### Issue for this PR Closes #36558 ### Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? `Process.stop()` in `packages/opencode/src/util/process.ts` only sent `proc.kill()` (SIGTERM) with no timeout or SIGKILL fallback. When an LSP server ignores SIGTERM (e.g. rust-analyzer, clangd

importance 1@beowulfofclosedautomated-pr-cleanupOriginal evidence ↗
pull request

fix(app): navigate tabs by selection history

## Summary - rename desktop menu navigation to Previous Tab and Next Tab - traverse tab selection history instead of visual tab order - skip closed tabs and duplicate entries for the active tab ## Testing - bun test --preload ./happydom.ts ./src/desktop-menu.test.ts ./src/context/tab-history.test.ts ./src/context/tabs.test.ts - bun typecheck - pre-push works

importance 1@HonaopenOriginal evidence ↗
pull request

feat(desktop): add radio group button for switching agent mode

### Issue for this PR Closes #38277 ### Type of change - [ ] Bug fix - [x] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? This PR adds a toggle button to switch between the plan/build modes. It only shows as toggle button when there are exactly 2 options, in all other cases it will fallback to the dropdown behavio

importance 1@PallieterVerhoevenopenOriginal evidence ↗
pull request

feat(tui): show optional daily session cost

### Issue for this PR Related to #39740. Session cost is already visible in the sidebar Context section, but users also need an optional total for all sessions updated today without running `opencode stats --days 1`. ### Type of change - [ ] Bug fix - [x] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? Adds an opti

importance 1@zbcodingopenOriginal evidence ↗
pull request

fix(provider): recover stalled model streams

### Issue for this PR Closes #37580 ### Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? A model endpoint can return headers and then stop sending body data. OpenCode waits forever in that state, so a stalled child can pin a parent session. This adds a provider-neutral idle watchdo

importance 1@dcadenasopenOriginal evidence ↗
pull request

feat(desktop): close to tray instead of exiting

### Issue for this PR Closes #18134 ### Type of change - [ ] Bug fix - [x] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? Clicking X on the desktop app used to quit it entirely, which killed any running agent work. This makes the window hide to the system tray instead on Windows/Linux. Tray menu has Show/Quit, cli

importance 1@2031814001yuyue-techOriginal evidence ↗
pull request

feat(app): add Run button to titlebar for project startup commands

### Issue for this PR ### Type of change - [ ] Bug fix - [x] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? Adds a Run button to the titlebar that executes the project startup command. The button appears only when a project has a startup command configured in its settings. ### How did you verify your code works? R

importance 1@mo-dev-studio-egopenOriginal evidence ↗
pull request

fix(acp): respect default agent variant

### Issue for this PR Closes #41628 ### Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? Fresh ACP sessions retained the configured default model but not the matching default agent variant, so initial effort fell back to the first available variant. This carries the variant in the

importance 1@apcooleyopenOriginal evidence ↗
pull request

fix(session): make retry cap and backoffDelay configurable per provider

### Issue for this PR Closes #21960 ### Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? Follow-up to #41939, which added the fixed `RETRY_MAX_RETRIES = 5` cap. That default is right for most cases, but the retry budget users want differs per provider (an aggressive retry loop agai

importance 1@eyalatoxopenOriginal evidence ↗
pull request

fix(session): interrupt a running prompt when a new one is submitted

### Issue for this PR Closes #41753 ### Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? **Problem.** When the assistant is mid-task and calls the bash tool with a long-running command (e.g. `sleep 30`), submitting a new prompt is not handled until the command finishes. The new pro

importance 1@ShinjukuZhuopenOriginal evidence ↗
pull request

refactor(app): align UI packages with solid best practices

## Summary Audit of the app UI against SolidJS best practices ([reference](https://www.brenelz.com/posts/solid-js-best-practices/)), with fixes across `packages/app`, `packages/ui`, and `packages/session-ui`. ### Pass values to JSX props, not signal accessors Components received `Accessor<T>` / `() => T` props and called them internally. JSX props compile to

importance 1@HonaclosedbetaOriginal evidence ↗
pull request

fix(tui): expose local attachment path to the model

Fixes #41454. ## Problem When a user attaches an image, PDF, or other binary file in the TUI (or the Web app) the part is sent to the model as a Vercel AI SDK `file` part with only the basename and the data URL. The on-disk path is kept in `FilePartSource` for UI metadata but is never threaded through to the model context, so the agent cannot reference the f

importance 1@karandhaodiyal28-hashOriginal evidence ↗
pull request

feat(core): add MiniMax image generation tool

Reason: MiniMax image generation is not available as an executable tool on the default branch. ## Summary - add the canonical `minimax_image_generation` built-in tool with permission checks and credential-safe failures - support the global and China image endpoints, both current image models, and the documented text-to-image request controls - return generat

importance 1@octo-patchOriginal evidence ↗
pull request

fix(mcp): retry local server connection on transient spawn failures

### Issue for this PR Closes #41996 ### Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? When opencode spawns MCP servers in parallel (`concurrency: "unbounded"` in `packages/opencode/src/mcp/index.ts`), transient races — e.g. `bun x` cache contention while many subprocesses resolv

importance 1@ImBIOSopenOriginal evidence ↗
pull request

docs: fix grammar in sdk and models pages

### Type of change - [x] Bug fix (docs grammar) - [ ] New feature - [ ] Refactor / code improvement - [x] Documentation ### What does this PR do? Fixes two English grammar mistakes in the docs: 1. `packages/web/src/content/docs/sdk.mdx` — "specifying an `format`" → "specifying a `format`" (`format` starts with a consonant, so "a" is correct). 2. `packages/we

importance 1@skyzhao1223closedcontributorOriginal evidence ↗
pull request

docs: add @oyadotai/opencode-plugin to ecosystem plugins

Adds [@oyadotai/opencode-plugin](https://www.npmjs.com/package/@oyadotai/opencode-plugin) to the plugins table on the ecosystem page. The plugin lets OpenCode build, deploy, and manage [Oya](https://getoya.ai) AI agents via the Oya MCP server: create agents with skills and scheduled routines, deploy them to a sandboxed cloud runtime, connect gateways (Slack,

importance 1@OyaAIProdclosedOriginal evidence ↗
pull request

fix(tool): skip plugin tools without descriptions

### Issue for this PR Refs #42026 ### Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? Skips plugin tool definitions whose `description` field is not a string before they enter the tool registry. The file-scanned tool path already guarded malformed exports with `isPluginTool(...)`,

importance 1@zcxGGmuopenneeds:issueOriginal evidence ↗
pull request

fix(desktop): stop sidecar before quitting

### Issue for this PR Closes #42097 ### Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? On Linux, closing the desktop app could terminate the Electron NodeService utility process with SIGABRT while local server cleanup was still running. That could trigger systemd-coredump and con

importance 1@mjnaderiopenOriginal evidence ↗
pull request

feat(opencode): bridge question tool to ACP elicitation

## Summary - Adds `packages/opencode/src/acp/elicitation.ts` — a handler (modelled on `permission.ts`) that translates the `question` tool part into an `unstable_createElicitation` ACP request and maps the client response back to `sdk.question.reply/reject` - Wires the handler into `ACPEvent.Subscription.handleToolPart` — when `toolName === "question"` and t

importance 1@pjaolclosedneeds:complianceOriginal evidence ↗
pull request

Exa main

### Issue for this PR Closes # ### Type of change - [ ] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? Please provide a description of the issue, the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say a

importance 1@Sheetaldharshan200closedneeds:titleneeds:complianceOriginal evidence ↗
pull request

fix: handle error where OPENCODE_CONFIG is pointing to a directory

### Issue for this PR Closes #42116 ### Type of change - [ x] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? Catch errors related from invalid values in OPENCODE_CONFIG_DIR / OPENCODE_CONFIG, report error instead of printing stack trace (bun dev)/unexpecter error (opencode binary) ### How did you ver

importance 1@hhamalaiclosedOriginal evidence ↗
pull request

fix(core): restore workspace.project_id for project ID remaps

### Issue for this PR Closes #42170 ### Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? Desktop crashed on session load with `Error: no such column: project_id` in `Project.migrateProjectId`. Some builds replaced the `workspace` table with a provider/binding schema and dropped `pr

importance 1@DatScreameropenOriginal evidence ↗
pull request

fix(desktop): use matching v2 CLI in WSL

## Summary - migrate Desktop WSL servers from opencode to opencode2 - require the WSL CLI version to match the Desktop server version exactly - use the official V2 installer with --version for releases - build the Linux CLI only when a local WSL install is requested, then install it with --binary - simplify the WSL controller around the normal user flow ## V

importance 1@HonaclosedOriginal evidence ↗
pull request

fix(tui): detach clipboard helper processes to survive SIGTSTP

## Bug Clipboard helper processes spawned by `packages/tui/src/clipboard.ts` (e.g. `wl-copy` on Wayland) inherited opencode's process group. `wl-copy` forks into the background to keep serving the clipboard selection after the initiating process exits — but since it shares opencode's pgid, sending `Ctrl-Z` to the terminal delivers `SIGTSTP` to the whole fore

importance 1@g0rdonLclosedneeds:issueOriginal evidence ↗
pull request

Readme fork

### Issue for this PR Closes # ### Type of change - [ ] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? Please provide a description of the issue, the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say a

importance 1@MethodWhiteclosedneeds:titleneeds:complianceOriginal evidence ↗
pull request

fix(core): apply external plugin changes after startup batch commits

### Issue for this PR Closes #42280 ### Type of change - [x] Bug fix ### What does this PR do? `ConfigExternalPlugin` loads plugins in a `forkScoped` fiber, which inherits the ambient `State` batch. Startup wraps loading in `State.batch(...)`, so once the startup effect returns, the batch is drained and gone — but the async plugin load finishes later, and it

importance 1@To-TermclosedOriginal evidence ↗
pull request

fix(opencode): skip tool files that fail to load

### Issue for this PR Closes #42258 ### Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? Custom tool files (`.opencode/tool/*.{js,ts}`) are dynamically imported when building the tool registry. If one file throws on import (e.g. its `@opencode-ai/plugin` dependency couldn't be inst

importance 1@DatScreameropenOriginal evidence ↗
pull request

docs(plugins): add apify plugin

### Issue for this PR Closes #41526 ### Type of change - [ ] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [x] Documentation ### What does this PR do? PR adds mention of Apify Open Code plugin to documentation in all the languages. Plugin lives here: https://github.com/apify/apify-opencode-plugin. Changes are simple docs update without any co

importance 1@Jakub-VacekopenOriginal evidence ↗
pull request

fix(opencode): persist Config.update to the loaded config file

### Issue for this PR Fixes #42276 and #28966 ### Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? The SDK's `client.config.update` (PATCH `/config`) returned 200 but the mutation was silently lost: a follow-up GET returned the original config and the file on disk was untouched. Up

importance 1@mdrkrgopenOriginal evidence ↗
pull request

fix(cli): stop `run` from sleeping through an exhausted quota

Fixes #40747 — `opencode run` produces no output and never returns when a model's quota is exhausted. It isn't wedged, it's sleeping. The quota error is classified as retryable, and `delay()` honors the provider's `retry-after`, which for a monthly limit is days. While the schedule sleeps, `halt()` never runs, so no `session.error` and no `idle` are publishe

importance 1@DaisukeYodaclosedOriginal evidence ↗
pull request

fix(app): scope review panel to the session's own file changes

### Issue for this PR Closes #41399 ### Type of change - [x] Bug fix ### What does this PR do? The Review / Files Changed panel in a session shows the full working-tree diff of the project directory. The working tree is shared by every session in the same folder, so a clean session B displays files that a concurrent session A is actively writing (#41399, #40

importance 1@yaosongdingopenOriginal evidence ↗
pull request

fix(skills): Update global config path in documentation

Clarified the global config path to include both JSON and JSONC formats. ### Issue for this PR Closes #32717 ### Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? Fixes an issue where AI agents almost always miss out on looking for opencode.jsonc file and assumes the global config f

importance 1@TechyAdityaclosedOriginal evidence ↗
pull request

feat(tui): prototype tab scroll controls

## What Add an opt-in TUI experiment for preserving reading position across visible quick-slot tabs and returning to the latest transcript content. Run it with: ```sh OPENCODE_EXPERIMENTAL_TAB_SCROLL=1 bun dev ``` When a visible tab is scrolled away from the bottom, switching away remembers its offset. Returning restores that reading position and shows a cli

importance 1@kitlangtonclosedcontributorOriginal evidence ↗
pull request

fix(cli): preserve server startup failure cause

## What When the managed background service exits before registering, the CLI now explains what happened and what to do next instead of dumping a raw Effect error and bundled stack frames. **1. The background service does not register** OpenCode starts its normal managed-service flow, but the child exits before creating its registration. ```text Starting bac

importance 0@kitlangtonclosedcontributorautomated-pr-cleanupOriginal evidence ↗
pull request

feat(tui): undo recent prompt with double escape

## Summary - track normal TUI prompt submissions for a two-second quick-undo window - make the second Escape abort and revert the exact submitted message - restore the prompt through the existing session revert flow and keep input focus ## Verification - `bun test src/component/prompt/quick-undo.test.ts` - `bun run typecheck` - `bun x prettier --check src/co

importance 0@opencode-agent[bot]closedcontributorautomated-pr-cleanupOriginal evidence ↗
pull request

feat(i18n): complete Portuguese (Brazil) translation for UI and app

### Issue for this PR Closes #35831 ### Type of change - [ ] Bug fix - [x] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? This PR completes the Portuguese (Brazil) translation for OpenCode by adding all missing keys in both: - \packages/ui/src/i18n/br.ts\ (added 23 missing UI strings) - \packages/app/src/i18n/br.t

importance 0@RicSchonfelderclosedautomated-pr-cleanupOriginal evidence ↗
pull request

feat(agent): add hiddenFromCycle config option to hide agents from tab rotation

### Issue for this PR Closes #36494 ### Type of change - [x] New feature ### What does this PR do? Adds a new agent config field `hiddenFromCycle` (`hidden_from_cycle` in markdown frontmatter) that hides agents from tab/shift+tab rotation while keeping them visible and selectable via `/agents`. Previously `hidden` controlled both. **What changed:** - V1/V2 c

importance 0@Cretezyclosedautomated-pr-cleanupOriginal evidence ↗
pull request

fix(tui): resolve keyboard deadlock in question mode

### Issue for this PR Closes #36382 Closes #30517 ### Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? The `QuestionPrompt` component has two `useBindings` calls with mutually exclusive `enabled` conditions: - Editing bindings: `enabled: store.editing && !confirm()` - List bindings

importance 0@maharshi365closedcontributorautomated-pr-cleanupOriginal evidence ↗
pull request

fix(core): preserve shell output tail

## Summary - add `keep: "head" | "tail"` to shell output pagination, defaulting to `head` - have ShellTool keep the final capture window without reaching into Shell backing storage - add a regression test proving the tail marker remains, the head marker is omitted, and the saved-output notice remains - regenerate current client surfaces for the query option

importance 0@opencode-agent[bot]closedcontributorautomated-pr-cleanupOriginal evidence ↗
pull request

fix(core): use catalog small model for session titles

## Summary - Session title generation now prefers `Catalog.model.small(provider)` when the title agent has no explicit model - Falls back to the session model if no small model is available or resolution fails - Agent-configured title model still wins over both ## Test plan - [x] `bun test test/session-title.test.ts` in `packages/core` - [x] `bun typecheck`

importance 0@rekram1-nodeclosedautomated-pr-cleanupOriginal evidence ↗
pull request

fix(core): bound compaction request size

## What Large sessions no longer become permanently wedged when their model context fits but the serialized inference request exceeds the service's 10 MiB body limit. Before, auto-compaction only considered model token pressure. A session at roughly 240k of a 1M-token context could therefore skip compaction and receive HTTP 413 forever. Compaction itself cou

importance 0@kitlangtonopencontributorOriginal evidence ↗