The Problem: Stale Session Titles
If you use OpenCode — the AI coding agent that runs in your terminal — you know the routine. You start a session, OpenCode auto-generates a title from your first prompt, and off you go. But thirty minutes later, that title no longer reflects what you’re actually working on. Your session list becomes a wall of vague, outdated labels that all blend together.
Finding the session where you fixed the auth bug? Good luck. Was it “Implement user authentication” or “Add login endpoint” or “Fix JWT expiry”? You end up clicking into five different sessions just to find the one you need.
The Solution: Rename on the Fly
opencode-rename-chat is a lightweight OpenCode plugin that adds a simple rename_chat tool. With one command, you can rename the current chat session to anything you want — right when the topic shifts.
No external services. No API keys. No configuration. It talks directly to OpenCode’s internal REST API.
How It Works
# In your OpenCode session, just type:
rename "Fixed auth middleware CORS headers"
# Or with a status marker:
rename "[DONE] 8-zone HVAC controller wiring diagram"
That’s it. The title updates instantly in your session list.
Installation
Install via npm:
npm install -g opencode-rename-chat
Or add it to your project:
npm install --save-dev opencode-rename-chat
Then register the plugin in your OpenCode config:
{
"plugins": ["opencode-rename-chat"]
}
Status Markers: Your Second Brain
The real power comes when you embed status markers in your titles. Here’s the workflow:
- [WIP] — actively working on this session
- [REVIEW] — done coding, needs a once-over before commit
- [DONE] — finished and merged, safe to archive
- [BLOCKED] — waiting on something (review, dependency, decision)
Scan your session list and you instantly know where everything stands. No more guessing which sessions are active and which are stale.
Why This Matters
AI coding sessions aren’t like files you save and close. They’re conversations that evolve. Your session list is your workspace — it should reflect reality, not the first thing you typed two hours ago.
A clean session list means:
- Less time hunting for the right session
- Clear context when you switch between tasks
- Obvious at-a-glance status of every thread
- Fewer abandoned sessions piling up
Open Source
opencode-rename-chat is MIT licensed and available on GitHub:
github.com/jcianci12/opencode-rename-chat
It’s a single-file plugin — easy to read, easy to fork, easy to customize. If you’ve got ideas for improvements, pull requests are welcome.
Try It Out
If you’re using OpenCode and tired of lost sessions, install it now:
npm install -g opencode-rename-chat
Rename your current session and see how much cleaner your session list feels. Your future self — the one trying to find that specific fix from three days ago — will thank you.
Leave a Reply