Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
c65bb26
feat(ui): add flat input surfaces and compact sizing (#60598)
usrnk1 Oct 30, 2026
a8091a2
fix(app): add top inset to recently closed menu search (#60652)
usrnk1 Oct 30, 2026
cb1e58f
fix(core): cap compaction's prompt size at the context window (#60660)
rekram1-node Oct 30, 2026
872f694
release: v2.2.4 (#60664)
github-actions[bot] Oct 30, 2026
822594b
fix(ai): stop demoting unsigned and interrupted reasoning to text (#6…
rekram1-node Oct 30, 2026
6700dd8
feat(core): accept a percentage for compaction.buffer (#60647)
rekram1-node Oct 30, 2026
bf5d12c
fix(app,tui): hide MCP integrations from the connect menu (#60675)
thdxr Oct 30, 2026
2e29481
fix(core): keep MCP quiet while a location shuts down (#60668)
rekram1-node Oct 30, 2026
ad71144
feat(app): send quotes directly from the comment popup (#60640)
usrnk1 Oct 30, 2026
ea982d7
fix(core): run calls to a bash tool as shell (#60687)
kitlangton Oct 30, 2026
0e82d22
fix(stats): scroll dense charts to latest data in Safari (#57459)
opencode-agent[bot] Oct 30, 2026
2f4653b
fix(core): show the closest lines when edit misses oldString (#60689)
kitlangton Oct 30, 2026
a03ccfd
fix(ci): fail desktop publish when an R2 upload fails (#60696)
thdxr Oct 30, 2026
9321c2c
fix(core): say which folder is missing when read misses (#60688)
kitlangton Oct 30, 2026
208ea0e
fix(ai): recognize LiteLLM context overflow errors (#60692)
rekram1-node Oct 30, 2026
1a443ae
fix(core): frame MCP stdio messages without the SDK read buffer (#60694)
rekram1-node Oct 30, 2026
171dbd6
feat(app): add worktree picker shortcuts and toggle shell mode (#60713)
usrnk1 Oct 30, 2026
958f965
chore: refresh docs and provider ordering (#60731)
thdxr Oct 30, 2026
9bbb8ce
release: v2.2.5
github-actions[bot] Oct 30, 2026
3a1bd6c
chore(sync): merge upstream v2 through v2.2.5
cursoragent Oct 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 30 additions & 5 deletions .github/release/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
# environment the workflow sets (OPENCODE_VERSION, OPENCODE_CHANNEL, OPENCODE_DRY_RUN, ...).

set -euo pipefail
# Without this, set -e does not apply inside $(...), so a failing command in a function called as
# files=$(upload_files ...) is ignored. macOS /bin/bash is 3.2, which lacks the option.
if [ "${BASH_VERSINFO[0]}" -gt 4 ] || { [ "${BASH_VERSINFO[0]}" = 4 ] && [ "${BASH_VERSINFO[1]}" -ge 4 ]; }; then
shopt -s inherit_errexit
fi

# shellcheck disable=SC2034 # used by the scripts that source this file
release_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
Expand Down Expand Up @@ -51,26 +56,46 @@ upload_files() {
r2_credentials
credentials=true
fi
aws s3 cp "$file" "s3://opencode-production-files/bin/$OPENCODE_VERSION/$name" --only-show-errors \
--endpoint-url "https://$CLOUDFLARE_ACCOUNT_ID.r2.cloudflarestorage.com" \
--content-type "$type" --content-disposition "attachment; filename=\"$name\"" \
--cache-control "public, max-age=31536000, immutable" >&2
upload_file "$file" "$name" "$type" || die "Upload failed: $name"
fi
jq -n --arg name "$name" --arg url "https://opencode.ai/files/bin/$OPENCODE_VERSION/$name" \
--arg sha256 "$(sha256 "$file" | cut -c1-64)" --argjson size "$(size "$file")" \
'{($name): {url: $url, sha256: $sha256, size: $size}}'
done | jq -s 'add'
}

# Uploads one file to R2 and confirms the stored object has the local size: upload_file <file> <name> <type>.
# R2 intermittently rejects CompleteMultipartUpload with InvalidPart, so failed uploads are retried.
upload_file() {
local key="bin/$OPENCODE_VERSION/$2" endpoint="https://$CLOUDFLARE_ACCOUNT_ID.r2.cloudflarestorage.com" attempt
for attempt in 1 2 3; do
if aws s3 cp "$1" "s3://opencode-production-files/$key" --only-show-errors --endpoint-url "$endpoint" \
--content-type "$3" --content-disposition "attachment; filename=\"$2\"" \
--cache-control "public, max-age=31536000, immutable" >&2 &&
[ "$(aws s3api head-object --bucket opencode-production-files --key "$key" --endpoint-url "$endpoint" \
--query ContentLength --output text)" = "$(size "$1")" ]; then
return
fi
echo "::warning::Upload attempt $attempt failed: $2" >&2
sleep $((attempt * 5))
done
return 1
}

# R2 accepts the API token ID as the access key and SHA-256(token) as the secret.
r2_credentials() {
local id
id=$(curl -fsS -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
"https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/tokens/verify" | jq -er .result.id)
"https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/tokens/verify" | jq -er .result.id) ||
die "Could not resolve R2 credentials"
export AWS_ACCESS_KEY_ID="$id"
AWS_SECRET_ACCESS_KEY=$(printf '%s' "$CLOUDFLARE_API_TOKEN" | sha256 | cut -c1-64)
export AWS_SECRET_ACCESS_KEY
export AWS_DEFAULT_REGION=auto AWS_REQUEST_CHECKSUM_CALCULATION=when_required AWS_RESPONSE_CHECKSUM_VALIDATION=when_required
# Larger parts mean fewer CompleteMultipartUpload parts for the 200-350 MB desktop builds.
AWS_CONFIG_FILE=$(mktemp)
export AWS_CONFIG_FILE
printf '[default]\ns3 =\n multipart_threshold = 64MB\n multipart_chunksize = 64MB\n' > "$AWS_CONFIG_FILE"
}

# Registers one artifact with the update server: publish_update <name> <distribution> <metadata json>.
Expand Down
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,50 @@

Release notes for OpenCode V2, newest first.

## v2.2.5 — 2026-10-30

### Highlights

- **Worktree and Shell Mode Shortcuts**: Press `⌘⌥O` on macOS or `Ctrl+Alt+O` on Windows and Linux to choose a worktree, and `⌘⌥B` or `Ctrl+Alt+B` to choose its base branch. `⌘⇧X` or `Ctrl+Shift+X` now toggles shell mode in the composer. ([#60713](https://github.com/anomalyco/opencode/pull/60713))
- **Send Quotes From the Comment Popup**: Hold `⌘` or `Ctrl` in the quote popup to turn its checkmark into send, or press `⌘Enter` or `Ctrl+Enter`, to send just that quote and comment while leaving the rest of the composer untouched. ([#60640](https://github.com/anomalyco/opencode/pull/60640))
- **Percentage Compaction Buffer**: Set `"compaction": { "buffer": "20%" }` in `opencode.json` to keep a share of each model's context window free, so one setting fits models with small and large windows. Token counts still work. ([#60647](https://github.com/anomalyco/opencode/pull/60647))

### Core

#### Improvements

- `compaction.buffer` accepts a percentage of the model's context window, such as `"20%"`, in addition to a token count. ([#60647](https://github.com/anomalyco/opencode/pull/60647))
- When `read` misses because a folder is missing, the error names that folder and the nearest one that exists. ([#60688](https://github.com/anomalyco/opencode/pull/60688))
- When `edit` can't find `oldString`, the error shows the file's closest lines, or says the change is already there. ([#60689](https://github.com/anomalyco/opencode/pull/60689))
- Calls to a tool named `bash` now run as `shell` instead of failing, with the same permissions. A plugin tool actually named `bash` still takes precedence. ([#60687](https://github.com/anomalyco/opencode/pull/60687))

#### Bug fixes

- MCP servers that send stdio messages larger than 10 MiB no longer get disconnected, and large messages are read much faster. ([#60694](https://github.com/anomalyco/opencode/pull/60694))
- Idle locations no longer restart their MCP servers right after shutting down. ([#60668](https://github.com/anomalyco/opencode/pull/60668))
- Compaction now caps its prompt at the model's context window when the input limit is larger. ([#60660](https://github.com/anomalyco/opencode/pull/60660))
- LiteLLM context window errors now trigger compaction instead of stopping the session. ([#60692](https://github.com/anomalyco/opencode/pull/60692))
- Reasoning is no longer turned into plain text when you switch models or resume an interrupted response, which caused request errors on some providers. ([#60498](https://github.com/anomalyco/opencode/pull/60498))

### TUI

#### Bug fixes

- The connect menu no longer lists MCP servers, which are managed in their own place. ([#60675](https://github.com/anomalyco/opencode/pull/60675))

### Desktop

#### Improvements

- Added keyboard shortcuts to choose a worktree and its base branch, shown in tooltips, and a shortcut to toggle shell mode. The worktree path can be selected to copy the full directory. ([#60713](https://github.com/anomalyco/opencode/pull/60713))
- Hold `⌘` or `Ctrl` in the quote popup to send a quote and its comment directly. ([#60640](https://github.com/anomalyco/opencode/pull/60640))
- Added flat input surfaces and a compact input size. ([#60598](https://github.com/anomalyco/opencode/pull/60598))

#### Bug fixes

- The connect menu no longer lists MCP servers. ([#60675](https://github.com/anomalyco/opencode/pull/60675))
- Added the missing top inset to the search field in the recently closed menu. ([#60652](https://github.com/anomalyco/opencode/pull/60652))

## v2.2.4 — 2026-10-30

### Highlights
Expand Down
Loading
Loading