## Summary `opencode2 service restart` starts a new `serve --service` daemon without terminating the old one; the stale daemon and its MCP server children keep running, duplicating MCP servers and leaking ~1.5 GB of RAM until manually killed. ## Environment - opencode version: 0.0.0-next-17403 (next channel, V2 beta) - OS: macOS 26.6.1 (Darwin 25.6.0, arm64)
## Summary The `serve --service` background daemon stays resident 24/7 holding ~700-800 MB RSS with no active sessions and 0% CPU (97% of `sample` frames in `kevent64` wait), which shows up as a permanent memory/energy footprint in Activity Monitor on a 16 GB MacBook Air. ## Environment - opencode version: 0.0.0-next-17403 (next channel, V2 beta) - OS: macOS
### Description TUI stuck when a message is queue and questions pop out. Inside a session ### Plugins no plugins ### OpenCode version 1.18.16 ### Steps to reproduce 1. openup a session 2. prompt something that makes ai work for a whle then should ask you a question 3. queue a message, in plan mode 4. now its stuck, you can type your answer but cant confirm y
### Description Runtime local config updates made through `Config.update()` do not round-trip through instance disposal/reload correctly. `Config.update()` writes to project-root `config.json`, but fresh project config loading reads the normal `opencode.json` / `opencode.jsonc` paths and local `.opencode/opencode.json[c]` overlays instead. Because of that mi
### Description When a command prints a single line larger than `tool_output.max_bytes` (default 50 KB) and the output ends with a newline, the shell tool hands the model a truncation banner followed by `(no output)` — the whole body is dropped. The same content without the trailing newline returns the expected 50 KB tail. Cause: `tail()` in `packages/openco
### Description Report: `deepseek-v4-pro` fails on OpenCode Go `/v1/responses` with 503 while `deepseek-v4-flash` works ## Summary Using Codex (Codex++ / Codex Desktop, Windows 11) with OpenCode Go: - Base URL: `https://opencode.ai/zen/go/v1` - Wire API: `responses` - Model: `deepseek-v4-pro` `deepseek-v4-flash` works with the exact same setup. `deepseek-v4-
### Description External v2 plugins (configured via `plugin` in opencode.json, or scanned from config directories) are loaded by `ConfigExternalPlugin` in a forked fiber. That fiber inherits the ambient `State` batch from location startup, which runs inside `State.batch(...)` and drains its reload set as soon as the startup effect returns. By the time an asy
### Description When a compaction summary turn fails with a provider error, everything before the compaction boundary is dropped from the model context and no summary replaces it. The messages stay in the database, so the UI looks fine — the model just stops knowing about the earlier turns, and it repeats on every following turn because the marker is already
### Description When opening a folder with the same name from different project directories in the OpenCode desktop app, the app incorrectly navigates to the previously opened project instead of opening the newly selected folder. ### Plugins _No response_ ### OpenCode version v1.18.17 ### Steps to reproduce Create two projects with the same folder name struc
### Description If OpenCode loses the in-memory runner for a session while a `task` tool call is still persisted as `pending` or `running`, aborting the session only marks it idle. The parent assistant message and task part remain unfinished, so the transcript shows a task that never completed. The TUI startup path for `--continue --fork` can also briefly ro
### Description `ensureTitle()` generates the session title with the **small** model (`small: true`). When that model is a *reasoning* model (e.g. GLM-4.6 / Kimi K3 via OpenRouter), the completion is frequently reasoning-only: after the `<think>…</think>` strip in `ensureTitle`, the remaining text is empty. The function then hits `if (!cleaned) return` and t
### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request 有时候,在使用agent完成任务时,我们不希望大模型有联网行为,虽然联网行为会得到更多的信息,但是这些信息可能是错误的或者不必要的。希望可以添加对大模型主动联网行为的控制,包括联网搜索抓取信息、从网络下载软件等综合行为,api连接等软件必须行为除外。在桌面版本的opencode下,我建议在输入框下和大模型的选择排在一起,添加按钮,简洁方便。
### Describe the enhancement you want to request Add a live token usage and cache analytics panel visible during an active OpenCode session. This would display: - Total tokens consumed in the current session (input + output separately) - Cache hit count and cache hit ratio as a percentage - Estimated cost for the current session based on the model being used
**Environment** - OpenCode Desktop 1.18.18 (reproduced on 1.16.2 too) - Windows 11 - Workspace root `C:\LiteWorkSpace` is NOT a git repo (git repos live in subdirectories) **Symptom** The right-side panel has two sections: "Changes this round" and "Git changes". The Git section always renders correctly, but "Changes this round" has been empty forever, even a
## Summary A freshly launched, completely idle `serve` service (and its TUI client) burns 20–45% CPU in silent periodic bursts from launch onward, with no log output during the bursts and continuous SQLite WAL writes. RSS creeps upward (~2% of RAM in 6 minutes). Reproduces on every launch; not caused by autoupdate, sessions, activity, or terminal. ## Environ
## Environment - opencode `1.18.18` (npm latest) - Linux x86_64, run in a terminal (`/dev/pts/*`) ## Observed (confirmed via strace + per-thread /proc sampling) - The TUI **main thread** holds ~1 full core (~94-100%) even when the user is not interacting. - `strace` shows the main thread repeatedly calling `writev(1, ...)` writing a ~106-byte spinner frame (
### Description Hit this while fixing a typo in my opencode.json. I had a syntax error (forgot the value after "model":) and the config uses {env:DEMO_KEY} for the API key. The error under "--- JSONC Input ---" printed my config back with the actual key value where {env:DEMO_KEY} was. I'd expect it to quote the file the way I wrote it. tui.json goes through
### Description # Title (EN) Same git remote URL produces identical project_id for different local clones → only one project visible in desktop sidebar # 标题 (中文) 相同的 git remote URL 导致不同本地 clone 生成相同的 project_id,桌面端侧边栏只能看到一个项目 --- ## English version ### Description When two local directories are clones of the **same git remote** (but on different branches / v
### Description The changed-files indicator in a conversation window lists files that were modified by *other* conversations or tools working in the same directory, not just the changes made by the current session. Observed case: in a session that created exactly one new file, the file-change panel reported 5 changed files. File timestamps show the other fil
## Bug In multi-step tool-call assistant messages, `processor.ts` overwrites `assistantMessage.tokens` on each `step-finish` event instead of accumulating additive fields. Only the last step's output, reasoning, and cache.write survive. ## Root cause `packages/opencode/src/session/processor.ts` step-finish handler: ```ts ctx.assistantMessage.cost += usage.co
## Summary When configuring OpenCode to call **Zhipu GLM (智谱)** via the **Anthropic-compatible endpoint** (`https://open.bigmodel.cn/api/anthropic`) with `@ai-sdk/anthropic`, the LLM stream **silently returns empty**: - Stream starts (`message=stream ... agent=build mode=primary`) - Within ~200–300ms the loop exits with `step=1` → `exiting loop` - **No chunk
### Description Updated to 1.18.8 this morning, `opencode --version` shows "1.18.8" Ran `opencode web` and in the web UI clicked on `Settings`. Just happened to notice it shows "v1.18.17" <img width="128" height="61" alt="Image" src="https://github.com/user-attachments/assets/9c5ebf6f-6199-4445-80ca-51f2d884b9b5" /> ### Plugins _No response_ ### OpenCode ver
### Description On the **session page** with the v2 prompt composer, typing an `@` mention mid-text and selecting a suggestion collapses the caret to the **end of the prompt** instead of keeping it right after the inserted mention. For example, with the prompt `please @src/index.ts fix the bug`, placing the caret after `please ` (offset 7), typing `@src`, an
### Description By using /customize-opencode skill, the AI agents always miss out on opencode.jsonc file for configuring opencode configurations such as MCPs, skills, etc. on both user and project folder level and agents just assume that config file is missing and proceed with creating a new one. ### Plugins _No response_ ### OpenCode version 1.18.18 ### Ste
## Summary TUI crashes with `Orphan text error: "<string>" must have a <text> as a parent` when a TUI plugin slot (`sidebar.content`) returns a plain string from `render()`. Plugins are effectively forced to return plain strings because importing `@opentui/*` inside a TUI plugin fails on `next-17403` with `OPENTUI_FORCE_WCWIDTH already registered with differ
## Summary When a session with a task/subagent child is forked, the forked parent still points at the original child session. Entering that child from the fork and clicking "back to parent" returns to the original parent session instead of the forked parent. ## Reproduction 1. Start a parent session `S1`. 2. Have it call the `task` tool / a subagent, produci
### Description Using the OpenCode Go plan as the provider for OpenAI Codex desktop (`model_provider = "opencode-go"`, `base_url = https://opencode.ai/zen/go/v1`, `wire_api = responses`, main model `deepseek-v4-flash`), Codex's built-in **Memories** feature runs background jobs (`memory_stage1`, `memory_consolidate_global`) after each session. Those jobs POS
### Summary On Windows, clicking the window close button (x) quits the OpenCode desktop app entirely. When the last window is closed, `window-all-closed` calls `app.quit()` (see `packages/desktop/src/main/index.ts`). I would like an option so that closing the window minimizes to the system tray / keeps the app running in the background instead of quitting, s
## Summary Project skills (and potentially agents/commands parsed via `ConfigMarkdown.parse`) **silently vanish** whenever the same markdown content is parsed more than once in a single server process **and** its frontmatter is not strict-YAML-valid (e.g. an unquoted `description:` containing `: `). Root cause: **gray-matter 4.0.3 registers its module-level
### Description When using local models (tested: qwen3.6-27b-mtp), opencode incorrectly parses model response text as tool call parameters. The parser appears to detect a tool name in the output, then captures surrounding prose as parameter values instead of treating it as plain text. Observed behavior: Tool calls appear with libraryId or other parameters co
### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request me d el siguiente eror The latest version of this model is only available hosted in China and requires explicit opt in: https://opencode.ai/workspace/wrk_01KZW3YQT6623SMXV5WG7BXM4X/go
### Description Description Automatic compaction can become stuck when using a DeepSeek reasoning model through an OpenAI-compatible provider. I reproduced this twice. Instead of producing a compaction summary, the model starts continuing patterns from the conversation history inside its reasoning, including sequences that look like prior tool calls and tool
## Summary In the TUI, the model used by a subagent is not displayed anywhere: neither in the subagent's block in the main thread, nor in the task/session list, nor in the subagent detail view. ## Environment - opencode version: 1.18.16 (`opencode --version`) - OS: macOS Darwin 25.6.0 (arm64) - Terminal: TERM=xterm-256color - Shell: /bin/zsh - Install/channe
## Summary In the TUI, while a subagent is running in the background, there is no live preview of the subagent's last message in the main agent thread — the step shows only its status/spinner. ## Environment - opencode version: 1.18.16 (`opencode --version`) - OS: macOS Darwin 25.6.0 (arm64) - Terminal: TERM=xterm-256color - Shell: /bin/zsh - Install/channel
## Summary Feature request: show background activities (running/background subagents) in a **right sidebar** in the TUI — a live list with status, expandable to preview the subagent's last message and see its model. ## Environment - opencode version: 1.18.16 (`opencode --version`) - OS: macOS Darwin arm64 - Terminal: TERM=xterm-256color - Shell: /bin/zsh - I
### Description Changes don't discard when message is reverted (in some projects) I use other agents too (for example: Antigravity), they successfully discard all changes from the reverted point, but in some project, open code doesn't do that ### Plugins Caveman, Magic Context ### OpenCode version 1.18.18 ### Steps to reproduce _No response_ ### Screenshot a
## Summary Running `/compact` in the TUI consistently fails: the compaction step is marked as failed (red `x Compaction`) and reports **"Compaction produced no summary"**. No session summary is produced, so context compaction does not work. ## Environment - opencode version: 1.18.16 (`opencode --version`) - OS: macOS Darwin arm64 - Terminal: TERM=xterm-256co
### Description OpenCode blocks startup on a synchronous network fetch of the model registry (`https://models.dev/api.json`, ~3.6MB) whenever the local cache (`~/.cache/opencode/models.json`) is older than the 5-minute TTL. On connections where that host is slow/unstable, this adds **10-30 seconds** to every launch before the TUI appears. Measured on opencod
## Problem Context-specific TUI actions can share a physical key with global or managed-textarea bindings. PR #42366 fixes the observed Shell-tab failure by giving the default `Ctrl+D` binding first refusal, but the mechanism is deliberately literal and local: ```ts if (event.name !== "d" || !event.ctrl) return if (!shortcuts.list("composer.shell.kill").incl
### Description On Windows, OpenCode's server-side prompt file-mention resolver (`SessionPrompt.resolvePromptParts`) scans the **entire** prompt text for `@` mentions and can resolve a stray `@\` byte sequence to the **drive root** `C:\`, then attaches the whole drive-root directory listing to the model context. The mention extractor uses: ```js FILE_REGEX =
### Issue for this PR Closes #42242 ### Type of change - [ ] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [x] Documentation ### What does this PR do? Adds [opencode-sandbox](https://github.com/isanchez31/opencode-sandbox-plugin) to the ecosystem list. The plugin provides OS-level sandboxing for agent-executed bash commands using seatbelt on
### Issue for this PR Relates to #37891 (partial: TUI file-path click only, not desktop/web) ### Type of change - [x] New feature ### What does this PR do? Makes the summary line of `Read`, `Grep`, and `Glob` tool blocks in the TUI clickable. Clicking opens the referenced file (or search root for grep/glob) in `$VISUAL`/`$EDITOR`, falling back to `code`. I f
### Issue for this PR Closes #37891 ### Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? In the desktop app, `file://` links and absolute paths in chat looked clickable but did nothing. Two causes: 1. DOMPurify dropped `file:` hrefs (default URI allowlist is web-only). 2. The deskt
### Issue for this PR Closes #37852 ### Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? AI SDK synthesizes an `other` finish when a provider stream ends without a finish reason. OpenCode treated that as a completed `unknown` response, so a subagent could return an empty successful
### Issue for this PR Closes #40331 ### Type of change - [ ] Bug fix - [x] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? The TUI already supports toggling auto-approve permissions through the `permission.mode` command, but users cannot assign that command a key in `tui.json`. This change adds `app_toggle_auto_app
### Issue for this PR Closes #41801 Refs #41268 Refs #41358 Refs #36682 ### Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? `/compact` (and auto-compaction) sends the summarization request as one user message: summary instruction first, then the serialized conversation. The conver
## Summary I've successfully implemented recursive loading of AGENTS.md files from child folders. Here's what I did: ### Changes Made: 1. **Added `findDown` function** in `/home/runner/work/opencode/opencode/packages/opencode/src/util/filesystem.ts:69-84`: - Searches for files recursively in child directories using Bun's glob functionality - Includes a confi
### Issue for this PR Closes #36517 ### Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor / code improvement - [ ] Documentation ### What does this PR do? On Amazon Bedrock (Anthropic Claude with extended thinking), opencode puts a prompt-cache breakpoint on the last couple of messages. The AI SDK emits message-level `bedrock.cachePoint` after ev