opencode statusline: no native key, so the bar comes from a TUI plugin
- opencode
- coding-agents
- agent-ops
No. opencode has no statusLine setting like Claude Code. Neither tui.json in opencode 1.x nor cli.json in opencode 2 has a status line key. The built-in footer already shows tokens, context percent and cost. For anything else you write a TUI plugin. It renders into a named footer slot.
{
"$schema": "https://opencode.ai/tui.json",
"plugin": ["./plugins/branch.tsx"]
}
- No native key. The published
tui.jsonschema has no status line entry. The feature request, issue #37464, is still open. - The default bar. Agent and model sit under the text input. Tokens, context percent and cost sit under the prompt box.
- The plugin route. In 1.x a TUI plugin fills slots such as
session_prompt_right. opencode 2 documents slots such asprompt.footer.status. - No stdin contract. A plugin is TypeScript inside the TUI. You do not get a shell command with session JSON.
- How I know. I do not run opencode. This reads the docs, the schema and the source of v1.19.4 and v2.1.4 on 25 October 2026.
How the Claude Code side works, and why I time every script in that bar, is in my statusLine post.
Does opencode have a status line like Claude Code?
Not as a setting. Claude Code pipes session JSON into your command and shows what it prints. opencode has nothing like it in config.
The schema at opencode.ai/tui.json has twelve settings plus $schema. None is a status line. The ones that matter here are plugin and plugin_enabled.
People have asked. Issue #37464, "Custom statusLine via shell command (like Claude Code)", opened on 17 July 2026. It is still open.
My Claude Code post said in September that opencode had no status line key in its docs. That still holds. What I missed was the plugin system.
What does the opencode TUI footer show by default?
In the v1.19.4 source both rows sit under the text input. Inside the prompt box, one row shows the agent name, an "auto" marker in auto mode, the model, the provider and the variant. Under the box, a second row shows the working directory. On its right you get tokens with the context percent, then the session cost once it is above zero. The sidebar repeats the numbers. When opencode compacts and how the percent is computed is in opencode context window.
One detail differs from Claude Code. opencode takes the last assistant message. It adds input, output, reasoning, cache read and cache write tokens. Claude Code's docs say used_percentage uses input tokens only, cache included, never output_tokens. Same label in the bar. Different number.
In opencode 2 the built-in opencode.prompt.footer plugin also counts running subagents and shells.
How do I make a custom statusline in opencode?
Write a TUI plugin. In 1.x its default export has an id and a tui function, where api.slots.register puts your JSX into a host slot. The plugin spec in the repo lists them. session_prompt_right is the right side of the agent and model row. sidebar_content is another. home_footer and sidebar_footer render one winner only, so a plugin there competes with the built-in footer.
This is my sketch. It copies the shape of the built-in home footer plugin. I have not run it. Outside the opencode repo it likely needs the @opentui/solid peer dependency installed:
/** @jsxImportSource @opentui/solid */
import type { TuiPlugin, TuiPluginModule } from "@opencode-ai/plugin/tui"
const tui: TuiPlugin = async (api) => {
api.slots.register({
order: 100,
slots: {
session_prompt_right() {
return <text fg={api.theme.current.textMuted}>{api.state.vcs?.branch ?? ""}</text>
},
},
})
}
const plugin: TuiPluginModule & { id: string } = { id: "me.branch", tui }
export default plugin
List the file under plugin in tui.json, as at the top. Per the spec, TUI plugins get no directory auto-discovery. What a plugin can read sits in api.state, from messages and todos to the git branch.
A warning on docs. All of this comes from the spec and the code. The plugins page covers server plugins and names three TUI events. In May a maintainer wrote on #25875 that the TUI plugin API is "already in the production version, just not officially documented yet."
How does it work in opencode 2?
Same idea, new API. This one is documented. The Building CLI plugins page lists the slots. Among them are home.footer.status, prompt.footer, prompt.footer.status and sidebar.content. The docs example:
context.ui.slot({ append: "home.footer.status", render: () => <text>SYNCED</text> })
Per the docs, home.footer.status adds to the built-in footer row without replacing it. prompt.footer.status is listed without a description.
Config moves too. The v2 plugins page puts CLI-only plugins in cli.json under plugins. A 1.x plugin does not carry over as is. The import moved from @opencode-ai/plugin/tui to @opencode/plugin/tui. The module shape is now Plugin.define with a setup function.
Is there an opencode subagent statusline?
Built in, partly. In 1.x a child session gets a footer with the agent label, its position such as "2 of 3", tokens, context percent and cost.
For all child sessions in one list there is opencode-subagent-statusline, "an MIT-licensed OpenCode TUI sidebar plugin" per its README. Version 2.x targets opencode 2, 1.3.1 stays on 1.x. I have not run it. How a subagent is defined, which model it gets and where the depth limit sits is in opencode subagents.
Which opencode statusline plugin is closest to Claude Code?
From what I read, opencode-cockpit. Its author wrote on #37464 that the Status bay has "command segments (any shell command, with its own refresh interval)". That is the Claude Code model. The README says it needs "OpenCode 1.18+ or 2.0.15+, on macOS or Linux." I have not checked the segment code.
A plugin is not a script you can time with a pipe. It runs inside the TUI. Read the code before you add it.
opencode vs Claude Code status line
| Claude Code | opencode 1.x | opencode 2 | |
|---|---|---|---|
| Status line key | statusLine in settings.json | None | None |
| Custom content | Any command, session JSON on stdin | TUI plugin listed in tui.json | CLI plugin, CLI-only ones in cli.json |
| Where it renders | The bar under the prompt | Slots like session_prompt_right | Slots like prompt.footer.status |
| Documented | Yes | Spec file in the repo | Yes |
Codex is a third model. Built-in items you pick, no command hook. That is in my Codex statusline post. The opencode permission flags are in opencode --dangerously-skip-permissions.
Frequently asked questions
Does opencode support statusLine in tui.json?
No. The published schema has no such key. The request is issue #37464, open since July 2026.
Why does opencode show a different context percent than Claude Code?
They count differently. opencode adds output and reasoning tokens to input and cache. Claude Code's used_percentage counts input and cache tokens only.
Did you test this?
No. opencode is not installed on my machine. This post reads the opencode docs, the tui.json schema and the source at tags v1.19.4 and v2.1.4 on 25 October 2026. The Claude Code parts come from its docs and from my statusLine post.
The verdict
Coming from Claude Code, you will not find statusLine. Check the default footer first. For more, write a plugin. On 1.x you build on a spec file, so pin the opencode version.
Sources, read on 25 October 2026: the opencode TUI, config and plugins pages, the tui.json schema, the v2 CLI plugins and Building CLI plugins pages, and the anomalyco/opencode repository at tags v1.19.4 and v2.1.4. Claude Code fields come from Customize your status line.