---
title: "OpenCode v1.2.21 | Havoptic"
description: "Core - Preserve original line endings in edit tool (@ranqn) - Fix Git path resolution for modified files across Git Bash, MSYS2, and Cygwin on Windows - Fix PTY session handle leak (@kikuchan) - Sa..."
image: "https://dev.havoptic.com/og-image.jpg"
---

# OpenCode v1.2.21

OpenCode v1.2.21 was released on March 7, 2026.

## Summary

Core - Preserve original line endings in edit tool (@ranqn) - Fix Git path resolution for modified files across Git Bash, MSYS2, and Cygwin on Windows - Fix PTY session handle leak (@kikuchan) - Sa...

## Release Context

- This was the 54th OpenCode release of 2026 tracked by Havoptic.
- It shipped 1 day after [OpenCode v1.2.20](https://dev.havoptic.com/r/opencode-1.2.20) (March 6, 2026).

### Shipped around the same time

Within 3 days of this release, other AI coding tools also shipped:

- [OpenAI Codex CLI rust-v0.113.0](https://dev.havoptic.com/r/openai-codex-rust-v0.113.0) (March 10, 2026)
- [v0 2026.03.10](https://dev.havoptic.com/r/v0-2026-03-10) (March 10, 2026)
- [Claude Code v2.1.72](https://dev.havoptic.com/r/claude-code-2.1.72) (March 9, 2026)
- [GitHub Copilot CLI v1.0.3](https://dev.havoptic.com/r/github-copilot-v1.0.3) (March 9, 2026)
- [Gemini CLI v0.33.0-preview.7](https://dev.havoptic.com/r/gemini-cli-v0.33.0-preview.7) (March 9, 2026)

### Compare OpenCode

- [OpenCode vs Claude Code](https://dev.havoptic.com/compare/claude-code-vs-opencode)
- [OpenCode vs OpenAI Codex CLI](https://dev.havoptic.com/compare/openai-codex-vs-opencode)
- [OpenCode vs Cursor](https://dev.havoptic.com/compare/cursor-vs-opencode)
- [OpenCode vs Gemini CLI](https://dev.havoptic.com/compare/gemini-cli-vs-opencode)
- [OpenCode vs Kiro CLI](https://dev.havoptic.com/compare/kiro-vs-opencode)
- [OpenCode vs GitHub Copilot CLI](https://dev.havoptic.com/compare/github-copilot-vs-opencode)
- [OpenCode vs Devin Desktop](https://dev.havoptic.com/compare/opencode-vs-windsurf)
- [OpenCode vs Antigravity CLI](https://dev.havoptic.com/compare/antigravity-cli-vs-opencode)
- [OpenCode vs Grok Build](https://dev.havoptic.com/compare/grok-build-vs-opencode)
- [OpenCode vs Cline](https://dev.havoptic.com/compare/cline-vs-opencode)
- [OpenCode vs Zed](https://dev.havoptic.com/compare/opencode-vs-zed)
- [OpenCode vs Factory Droid](https://dev.havoptic.com/compare/factory-droid-vs-opencode)
- [OpenCode vs Devin](https://dev.havoptic.com/compare/devin-vs-opencode)
- [OpenCode vs Lovable](https://dev.havoptic.com/compare/lovable-vs-opencode)
- [OpenCode vs Amp](https://dev.havoptic.com/compare/amp-vs-opencode)
- [OpenCode vs GitHub Copilot in VS Code](https://dev.havoptic.com/compare/copilot-vscode-vs-opencode)
- [OpenCode vs Replit Agent](https://dev.havoptic.com/compare/opencode-vs-replit-agent)
- [OpenCode vs Bolt](https://dev.havoptic.com/compare/bolt-vs-opencode)
- [OpenCode vs v0](https://dev.havoptic.com/compare/opencode-vs-v0)

## Release Notes

Core - Preserve original line endings in edit tool (@ranqn) - Fix Git path resolution for modified files across Git Bash, MSYS2, and Cygwin on Windows - Fix PTY session handle leak (@kikuchan) - Sanitize preview database filenames - Log stack trace when schema validation fails - I need to see the actual commit diff to understand what was fixed and provide an accurate changelog entry. - Add project git init API - Update Drizzle and channel database handling - Speed up share loads - Enable auto-accept keybind regardless of permission config (@luisfelipesena) TUI - Fix broken /export toggling in TUI (@natewill) Desktop - Guard session-header current() against undefined when options is empty (@cyberprophet) - Preserve file tree tab on reopen and fix e2e test regressions (@neriousy) - Remove close button from project hover popover - New session uses agent model/variant - Model sticks to session after being changed - Based on the commit message "fix(app): all panels transition", here's the changelog entry: All panels transition correctly - Can't scroll files in app - Fix maximum width on timeline component - Align session empty states in TUI - Add interactive timeline visualization feature - Share workspace slug wait helper across e2e specs - Abort sessions and wait for idle before e2e cleanup - Show skill issue when snapshotting is off in desktop app - Fix portal positioning for sidebar menus and tooltips by removing conditional mount logic - Add end-to-end tests for app (part 67) (@neriousy) - Add sidebar reveal animation, hover peek overlay, and weaker dividers to app - Better review and file tree empty states - Enable Safari autocorrect in normal mode, disable in shell mode (@alexandrereyes) - Revert stale read error fix in app - Add English to locale matchers (@KirillTregubov) Thank you to 12 community contributors: - @luisfelipesena: - fix(app): enable auto-accept keybind regardless of permission config (16259) - @imdzx: - feat: Add Vietnamese README and update all language navigation links … (16322) - @KirillTregubov: - fix(app): add english to locale matchers (16280) - @hoshiumiarata: - fix(ui): prevent unwanted key events during composition in LineCommentEditor (16361) - @alexandrereyes: - fix(app): enable Safari autocorrect in normal mode, disable in shell mode (15563) - @neriousy: - tests(app): e2e tests part 67 (16406) - fix(app): preserve file tree tab on reopen + fix e2e test regressions (16482) - @kikuchan: - fix(pty): pty session handle leak (15599) - @ShriKaranHanda: - fix(config): point GitHub PR search tool at current repository (16441) - fix(storybook): restore build by mocking useLocation (16472) - @natewill: - fix(tui): fix broken /export toggling (16443) - @ranqn: - fix(opencode): preserve original line endings in 'edit' tool (9443) - @cyberprophet: - fix(app): guard session-header current() against undefined when options is empty (16478) - @Eric-Guo: - fix(app): text-shimmer undefined length (16475)

[View original release](https://github.com/anomalyco/opencode/releases/tag/v1.2.21)

## Other Recent OpenCode Releases

- [v2.4.2](https://dev.havoptic.com/r/opencode-2.4.2) (November 26, 2026)
- [v2.4.1](https://dev.havoptic.com/r/opencode-2.4.1) (November 23, 2026)
- [v2.4.0](https://dev.havoptic.com/r/opencode-2.4.0) (November 23, 2026)
- [v2.3.2](https://dev.havoptic.com/r/opencode-2.3.2) (November 18, 2026)
- [v2.3.1](https://dev.havoptic.com/r/opencode-2.3.1) (November 18, 2026)

Upgrading from v1.2.21? [See all 163 releases since](https://dev.havoptic.com/r/opencode/diff?from=1.2.21&to=latest).

[All OpenCode releases](https://dev.havoptic.com/tools/opencode) · [All AI coding tool releases on Havoptic](https://dev.havoptic.com/)

```json
{
  "@context": "https://schema.org",
  "@type": "WebSite",
  "name": "Havoptic",
  "alternateName": "Havoptic AI Tool Releases",
  "url": "https://www.havoptic.com/",
  "description": "Havoptic tracks every release of 20 AI coding tools, from Claude Code and Codex CLI to Cursor and Copilot CLI, and explains each one in plain English within hours of shipping.",
  "publisher": {
    "@type": "Organization",
    "name": "Havoptic",
    "url": "https://www.havoptic.com/"
  },
  "potentialAction": {
    "@type": "SearchAction",
    "target": "https://www.havoptic.com/?q={search_term_string}",
    "query-input": "required name=search_term_string"
  }
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "SoftwareApplication",
  "name": "Havoptic",
  "applicationCategory": "DeveloperApplication",
  "operatingSystem": "Web",
  "offers": {
    "@type": "Offer",
    "price": "0",
    "priceCurrency": "USD"
  },
  "description": "Havoptic tracks every release of 20 AI coding tools, from Claude Code and Codex CLI to Cursor and Copilot CLI, and explains each one in plain English within hours of shipping."
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "@id": "https://www.havoptic.com/#organization",
  "name": "Havoptic",
  "url": "https://www.havoptic.com/",
  "logo": {
    "@type": "ImageObject",
    "url": "https://www.havoptic.com/og-image.jpg",
    "width": 1200,
    "height": 630
  },
  "description": "Release tracking, plain-English release notes and side-by-side comparisons for AI coding tools, updated hourly.",
  "foundingDate": "2025",
  "sameAs": [
    "https://github.com/scotthavird/havoptic.com",
    "https://x.com/havoptic"
  ],
  "founder": {
    "@id": "https://www.havoptic.com/authors/scott-havird#person"
  }
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "DataCatalog",
  "@id": "https://www.havoptic.com/#data-catalog",
  "name": "Havoptic AI Coding Tool Release Data",
  "description": "Every release of 20 AI coding tools, dated and explained in plain English within hours of shipping, plus feature comparison matrices, free to query through an API, an MCP server, feeds and a CLI. Covers Claude Code, OpenAI Codex CLI, Cursor, Gemini CLI, Kiro, GitHub Copilot CLI, Devin Desktop, Antigravity CLI, Grok Build, Cline, OpenCode, Zed, Factory Droid, Devin (cloud agent), Lovable, Amp, GitHub Copilot in VS Code, Replit Agent, Bolt, and v0.",
  "url": "https://www.havoptic.com/api-docs",
  "publisher": {
    "@type": "Organization",
    "name": "Havoptic",
    "url": "https://www.havoptic.com/"
  },
  "dataset": [
    {
      "@type": "Dataset",
      "@id": "https://www.havoptic.com/data/releases.json",
      "name": "AI Coding Tool Releases",
      "description": "Complete release history for Claude Code, OpenAI Codex CLI, Cursor, Gemini CLI, Kiro, GitHub Copilot CLI, Devin Desktop, Antigravity CLI, Grok Build, Cline, OpenCode, Zed, Factory Droid, Devin (cloud agent), Lovable, Amp, GitHub Copilot in VS Code, Replit Agent, Bolt, and v0 — including version numbers, release dates, plain-English summaries, and full changelogs. Updated hourly.",
      "url": "https://www.havoptic.com/data/releases.json",
      "distribution": {
        "@type": "DataDownload",
        "encodingFormat": "application/json",
        "contentUrl": "https://www.havoptic.com/data/releases.json"
      },
      "temporalCoverage": "2025/..",
      "creator": {
        "@id": "https://www.havoptic.com/#organization"
      },
      "maintainer": {
        "@type": "Organization",
        "name": "Havoptic",
        "url": "https://www.havoptic.com/"
      },
      "isAccessibleForFree": true,
      "license": "https://creativecommons.org/licenses/by/4.0/",
      "keywords": [
        "Claude Code",
        "OpenAI Codex CLI",
        "Cursor",
        "Gemini CLI",
        "Kiro",
        "GitHub Copilot CLI",
        "Devin Desktop",
        "Windsurf",
        "Antigravity CLI",
        "Grok Build",
        "Cline",
        "OpenCode",
        "Zed",
        "Factory Droid",
        "Devin (cloud agent)",
        "Lovable",
        "Amp",
        "GitHub Copilot in VS Code",
        "Replit Agent",
        "Bolt",
        "v0",
        "AI coding tools",
        "release history",
        "changelogs"
      ]
    },
    {
      "@type": "Dataset",
      "@id": "https://www.havoptic.com/data/feature-matrix.json",
      "name": "AI Coding Tool Feature Matrix",
      "description": "Side-by-side feature comparison data for 20 AI coding tools across categories: Core Editing, Terminal Integration, MCP Support, IDE Integrations, and Agentic Features.",
      "url": "https://www.havoptic.com/data/feature-matrix.json",
      "distribution": {
        "@type": "DataDownload",
        "encodingFormat": "application/json",
        "contentUrl": "https://www.havoptic.com/data/feature-matrix.json"
      },
      "creator": {
        "@id": "https://www.havoptic.com/#organization"
      },
      "maintainer": {
        "@type": "Organization",
        "name": "Havoptic",
        "url": "https://www.havoptic.com/"
      },
      "isAccessibleForFree": true,
      "license": "https://creativecommons.org/licenses/by/4.0/",
      "keywords": [
        "AI coding tools",
        "feature comparison",
        "Claude Code",
        "Cursor",
        "GitHub Copilot",
        "Gemini CLI",
        "Devin Desktop",
        "Windsurf"
      ]
    }
  ]
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    {
      "@type": "ListItem",
      "position": 1,
      "name": "Home",
      "item": "https://dev.havoptic.com"
    },
    {
      "@type": "ListItem",
      "position": 2,
      "name": "OpenCode",
      "item": "https://dev.havoptic.com/tools/opencode"
    },
    {
      "@type": "ListItem",
      "position": 3,
      "name": "v1.2.21",
      "item": "https://dev.havoptic.com/r/opencode-1.2.21"
    }
  ]
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "TechArticle",
  "headline": "OpenCode v1.2.21",
  "datePublished": "2026-03-07T18:01:01.000Z",
  "dateModified": "2026-03-07T18:01:01.000Z",
  "url": "https://dev.havoptic.com/r/opencode-1.2.21",
  "image": "https://dev.havoptic.com/og-image.jpg",
  "description": "Core - Preserve original line endings in edit tool (@ranqn) - Fix Git path resolution for modified files across Git Bash, MSYS2, and Cygwin on Windows - Fix PTY session handle leak (@kikuchan) - Sa...",
  "isBasedOn": "https://github.com/anomalyco/opencode/releases/tag/v1.2.21",
  "about": {
    "@type": "SoftwareApplication",
    "name": "OpenCode",
    "softwareVersion": "1.2.21",
    "applicationCategory": "DeveloperApplication",
    "url": "https://github.com/anomalyco/opencode/releases/tag/v1.2.21",
    "releaseNotes": "Core - Preserve original line endings in edit tool (@ranqn) - Fix Git path resolution for modified files across Git Bash, MSYS2, and Cygwin on Windows - Fix PTY session handle leak (@kikuchan) - Sanitize preview database filenames - Log stack trace when schema validation fails - I need to see the actual commit diff to understand what was fixed and provide an accurate changelog entry. - Add project git init API - Update Drizzle and channel database handling - Speed up share loads - Enable auto-accept keybind regardless of permission config (@luisfelipesena) TUI - Fix broken /export toggling in TUI (@natewill) Desktop - Guard session-header current() against undefined when options is empty (@cyberprophet) - Preserve file tree tab on reopen and fix e2e test regressions (@neriousy) - Remove close button from project hover popover - New session uses agent model/variant - Model sticks to session after being changed - Based on the commit message \"fix(app): all panels transition\", here's the changelog entry: All panels transition correctly - Can't scroll files in app - Fix maximum width on timeline component - Align session empty states in TUI - Add interactive timeline visualization feature - Share workspace slug wait helper across e2e specs - Abort sessions and wait for idle before e2e cleanup - Show skill issue when snapshotting is off in desktop app - Fix portal positioning for sidebar menus and tooltips by removing conditional mount logic - Add end-to-end tests for app (part 67) (@neriousy) - Add sidebar reveal animation, hover peek overlay, and weaker dividers to app - Better review and file tree empty states - Enable Safari autocorrect in normal mode, disable in shell mode (@alexandrereyes) - Revert stale read error fix in app - Add English to locale matchers (@KirillTregubov) Thank you to 12 community contributors: - @luisfelipesena: - fix(app): enable auto-accept keybind regardless of permission config (16259) - @imdzx: - feat: Add Vietnamese README and update all "
  },
  "articleBody": "Core - Preserve original line endings in edit tool (@ranqn) - Fix Git path resolution for modified files across Git Bash, MSYS2, and Cygwin on Windows - Fix PTY session handle leak (@kikuchan) - Sanitize preview database filenames - Log stack trace when schema validation fails - I need to see the actual commit diff to understand what was fixed and provide an accurate changelog entry. - Add project git init API - Update Drizzle and channel database handling - Speed up share loads - Enable auto-accept keybind regardless of permission config (@luisfelipesena) TUI - Fix broken /export toggling in TUI (@natewill) Desktop - Guard session-header current() against undefined when options is empty (@cyberprophet) - Preserve file tree tab on reopen and fix e2e test regressions (@neriousy) - Remove close button from project hover popover - New session uses agent model/variant - Model sticks to session after being changed - Based on the commit message \"fix(app): all panels transition\", here's the changelog entry: All panels transition correctly - Can't scroll files in app - Fix maximum width on timeline component - Align session empty states in TUI - Add interactive timeline visualization feature - Share workspace slug wait helper across e2e specs - Abort sessions and wait for idle before e2e cleanup - Show skill issue when snapshotting is off in desktop app - Fix portal positioning for sidebar menus and tooltips by removing conditional mount logic - Add end-to-end tests for app (part 67) (@neriousy) - Add sidebar reveal animation, hover peek overlay, and weaker dividers to app - Better review and file tree empty states - Enable Safari autocorrect in normal mode, disable in shell mode (@alexandrereyes) - Revert stale read error fix in app - Add English to locale matchers (@KirillTregubov) Thank you to 12 community contributors: - @luisfelipesena: - fix(app): enable auto-accept keybind regardless of permission config (16259) - @imdzx: - feat: Add Vietnamese README and update all language navigation links … (16322) - @KirillTregubov: - fix(app): add english to locale matchers (16280) - @hoshiumiarata: - fix(ui): prevent unwanted key events during composition in LineCommentEditor (16361) - @alexandrereyes: - fix(app): enable Safari autocorrect in normal mode, disable in shell mode (15563) - @neriousy: - tests(app): e2e tests part 67 (16406) - fix(app): preserve file tree tab on reopen + fix e2e test regressions (16482) - @kikuchan: - fix(pty): pty session handle leak (15599) - @ShriKaranHanda: - fix(config): point GitHub PR search tool at current repository (16441) - fix(storybook): restore build by mocking useLocation (16472) - @natewill: - fix(tui): fix broken /export toggling (16443) - @ranqn: - fix(opencode): preserve original line endings in 'edit' tool (9443) - @cyberprophet: - fix(app): guard session-header current() against undefined when options is empty (16478) - @Eric-Guo: - fix(app): text-shimmer undefined length (16475)",
  "author": {
    "@id": "https://dev.havoptic.com/#organization"
  },
  "publisher": {
    "@id": "https://dev.havoptic.com/#organization"
  },
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://dev.havoptic.com/r/opencode-1.2.21"
  },
  "speakable": {
    "@type": "SpeakableSpecification",
    "cssSelector": [
      "h1",
      "#ssr-content p"
    ]
  }
}
```
