# OpenCode's 5 Hidden Uses: The 178K-Star Terminal AI Agent That Swaps Providers Mid-Session

> Source: <https://dev.to/_cbd692d476c5faf3b61bcf/opencodes-5-hidden-uses-the-178k-star-terminal-ai-agent-that-swaps-providers-mid-session-2e55>
> Published: 2026-06-25 03:06:41+00:00

What if your terminal AI agent could talk to 30+ LLM providers, run isolated background tasks, load custom plugins from npm, and authenticate to MCP servers — all from a single `npm install`

?

OpenCode is a 178,218-star open source AI coding agent built in TypeScript. It crossed 1,274 points on Hacker News in March 2026, and its latest release (v1.17.10, June 24 2026) added MCP resource templates, OAuth-bound callbacks, and a new `--mini`

CLI mode. Most developers use it as a Claude Code alternative in the terminal — but scratch the surface and you'll find a plugin ecosystem, multi-agent architecture, and provider abstraction that go far beyond autocomplete.

In 2026's landscape of AI coding tools, where Cursor, Claude Code, Codex CLI, and Goose all compete for developer mindshare, OpenCode stands out by being completely open source (MIT license), provider-agnostic (30+ providers including self-hosted), and built around an extensible plugin + skill + MCP architecture. Here are five hidden uses that most people miss.

**What most people do:** Use OpenCode with a single API key — Anthropic, OpenAI, or whatever they have.

**The hidden trick:** OpenCode's provider plugin system supports 30+ providers out of the box, including Anthropic, OpenAI, Google, DeepSeek, Mistral, Groq, TogetherAI, OpenRouter, GitHub Copilot, GitLab, Snowflake Cortex, and many more. You can configure multiple providers with different models and switch between them mid-session using the `/model`

command. Even better, you can add custom OpenAI-compatible providers pointing to self-hosted models (Ollama, vLLM, LM Studio).

```
# Configure OpenCode with a custom provider for local Ollama
opencode config set providers.ollama.baseUrl "http://localhost:11434/v1"
opencode config set providers.ollama.models '[{"id":"llama3.3","name":"Llama 3.3 70B"}]'

# Switch between providers in-session
# Just type: /model ollama/llama3.3
# Or: /model anthropic/claude-sonnet-4-20250514
```

**The result:** Your coding agent becomes provider-agnostic. When Anthropic rate-limits you, switch to DeepSeek. When you need a cheap model for exploration, use Groq. When you need to run on-prem, point to your Ollama instance — all without leaving the session.

**Data sources:** OpenCode GitHub 178,218 Stars, HN 1,274 pts/618 comments (story 47460525), 30+ provider plugins confirmed from repo tree (packages/core/src/plugin/provider/*.ts).

**What most people do:** Use OpenCode as-is, with its built-in features.

**The hidden trick:** OpenCode has a full plugin system. You can install plugins from npm packages, load custom ones from directories, or write your own. Plugins can add custom agents, commands, providers, and even inject system context. The plugin lifecycle supports installation, loading, hot-reloading, and sandboxing.

```
# Install a plugin from npm
opencode plugin install @my-org/opencode-custom-agent

# Load a local plugin from a directory
opencode --plugin ./my-custom-plugin/

# List installed plugins
opencode plugin list
```

Plugins are written in TypeScript and can register:

`/review-pr`

, `/deploy-staging`

)**The result:** You can extend OpenCode with domain-specific capabilities — a `/run-migrations`

command that knows your database schema, a code-review agent tuned to your team's conventions, or a deployment plugin that wraps your CI/CD pipeline.

**Data sources:** OpenCode v1.17.10 release notes (2026-06-24), plugin system confirmed in repo tree (packages/plugin/src/v2/*, packages/core/src/plugin/*).

**What most people do:** Use MCP servers with either no auth or static API keys pasted into config.

**The hidden trick:** OpenCode supports full MCP OAuth flows. When you connect to an MCP server that requires OAuth (e.g., GitHub, Slack, Jira), OpenCode opens a browser-based OAuth flow, handles the callback on an IPv4 loopback server (bound for security in v1.17.10), and manages token refresh automatically. This means you can use GitHub's MCP server to create issues, read PRs, and manage repositories — all through natural language in your terminal.

```
# Add an MCP server with OAuth support
opencode mcp add github --url https://api.github.com/mcp

# OpenCode will prompt OAuth login in browser
# After auth, you can say:
# "Create a PR from my current branch to main with title 'Fix auth bug'"
# "List all open issues assigned to me"
```

**The result:** Your terminal agent becomes a bridge to external services with proper authentication. No more pasting tokens into config files — OAuth handles it securely with automatic refresh.

**Data sources:** OpenCode v1.17.10 release notes — "Bound MCP OAuth callbacks to IPv4 loopback for better local auth reliability" (@he-yufeng), MCP auth system confirmed in packages/opencode/src/mcp/auth.ts.

**What most people do:** Use OpenCode's default "build" agent for everything.

**The hidden trick:** OpenCode ships with two built-in agents: **build** (full access, default) and **plan** (read-only, asks permission before running commands). You switch between them with the Tab key. The plan agent is perfect for exploring unfamiliar codebases, analyzing architecture, or planning refactors — without risk of accidental edits. Additionally, OpenCode supports background sub-agents that run in parallel. You can spawn a `@general`

sub-agent for complex searches while continuing to code in the main session.

```
# Start OpenCode
opencode

# Press Tab to switch between build and plan agents
# In plan agent: "Analyze the authentication flow in this codebase"
# In build agent: "Refactor the auth module to use the new token format"

# Spawn a sub-agent for background work
# Type: @general search for all TODO items related to error handling
# Continue coding while sub-agent works
```

**The result:** The plan agent acts as a safe exploration mode — you can hand it to a junior developer or use it in CI pipelines where you want analysis without modifications. Background sub-agents let you parallelize research and coding, effectively turning your terminal into a multi-agent workspace.

**Data sources:** OpenCode README (dev branch) — "build agent (full-access) / plan agent (read-only, asks permission)", HN 319pts story "Opencode: AI coding agent, built for the terminal" (id 44482504).

**What most people do:** Type the same instructions repeatedly ("write tests", "review this PR", "check for security issues").

**The hidden trick:** OpenCode has a built-in skills system. Skills are markdown files (`.md`

) stored in `.opencode/skills/`

that define reusable prompt templates. You can invoke them with `/skill-name`

, and they support frontmatter configuration for customization. OpenCode ships with built-in skills like `customize-opencode`

and `effect`

, and you can create your own.

```
# .opencode/skills/review-security.md
---
name: review-security
description: "Security-focused code review"
tools: [read, list, grep]
---

Review the current file for security vulnerabilities:
1. Check for SQL injection patterns
2. Look for hardcoded secrets or API keys
3. Verify input validation on all user-facing endpoints
4. Flag any use of eval() or dynamic imports
# Invoke the custom skill
/review-security

# Or use built-in skills
/customize-opencode  # OpCode's own configuration wizard
```

**The result:** Skills turn repeated instructions into shareable, version-controlled templates. Your team can maintain a library of skills in the repo, and every developer on the team gets the same consistent behavior — no more copy-pasting prompts or forgetting steps in code reviews.

**Data sources:** OpenCode repo tree — `.opencode/skills/effect/SKILL.md`

, `packages/core/src/skill/*`

, `packages/opencode/src/skill/discovery.ts`

, v1.17.10 release notes mentioning skill base directories.

If you enjoyed this article, check out previous entries in the "5 Hidden Uses" series:

Have you discovered a hidden use for OpenCode — a plugin, skill, or workflow that most people don't know about? Drop it in the comments below!
