Skip to content

feat(opencode): add configurable terminal title format#15908

Open
prestonvanloon wants to merge 1 commit intoanomalyco:devfrom
prestonvanloon:feat/terminal-title-format
Open

feat(opencode): add configurable terminal title format#15908
prestonvanloon wants to merge 1 commit intoanomalyco:devfrom
prestonvanloon:feat/terminal-title-format

Conversation

@prestonvanloon
Copy link

Issue for this PR

Closes #4539

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds an optional terminal_title config field that lets users customize the terminal/tmux pane title with template placeholders:

  • %n — session name
  • %s — status (BUSY/IDLE)
  • %m — current model (provider/model)
  • %a — current agent

Example config:

{
  "terminal_title": "[%s] OC | %n"
}

Without this config, behavior is unchanged — the title stays OC | <session name> as before.

How did you verify your code works?

  • Ran bun dev . with terminal_title set in ~/.config/opencode/opencode.json, confirmed title updates reactively when session transitions between BUSY and IDLE
  • Verified default behavior (no config) is unchanged
  • bun run typecheck passes on packages/opencode
  • bun test passes on packages/opencode (1 pre-existing unrelated failure in tool.write permissions test)

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Add terminal_title config option with template placeholders:
  %n - session name
  %s - BUSY/IDLE status
  %m - current model
  %a - current agent

Example: terminal_title = "[%s] OC | %n"

Default behavior unchanged - without config, title remains "OC | <session>".

Closes anomalyco#4539
@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Add an option to set the terminal window title

1 participant