2
近 30 天 +1
548
近 7 天 548
42.9
生态多维模型
1 天前
2026-10-03
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-tmux-session-status@0.1.2"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-tmux-session-status@0.1.2"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D opencode-tmux-session-statusOpenCode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
OpenCode plugin that writes @opencode_state, @opencode_state_at, and
@opencode_detail to the owning tmux session for use by a picker or status
line. It also sends desktop notifications for waiting, done, and error.
Designed for tmux-opencode-session-manager:
one session per project on the opencode-popup socket, named
oc_<cksum-of-dir> (printf '%s' "$dir" | cksum). The directory string must
match the launcher's cwd exactly; different spellings, trailing slashes,
symlinks, or worktrees produce different session names.
Install
opencode plugin add opencode-tmux-session-status@latest
# Or from GitHub:
opencode plugin add github:4m1z/opencode-tmux-session-status
Alternatively, add it to opencode.json / opencode.jsonc:
{ "plugins": ["opencode-tmux-session-status@latest"] }
Requires tmux and cksum on PATH. Notifications use
omarchy notification send, falling back to notify-send. A missing tmux
session does not interrupt OpenCode.
Options
{
"plugins": [
{
"package": "opencode-tmux-session-status@latest",
"options": {
"socket": "opencode-popup", // tmux server socket (-L)
"prefix": "oc_", // before the directory hash
"notifications": true,
"notifier": "auto", // omarchy then notify-send; or "notify-send" only
"notificationCooldownMs": 120000,
"changedDetailFloorMs": 15000,
"normalUrgency": "normal", // done
"attentionUrgency": "critical", // waiting/error
"notificationDetail": "full", // or "state" to hide details
"debug": false,
},
},
],
}
State model
| State | Meaning |
|---|---|
working |
Agent running |
waiting |
Permission or answer needed |
done |
Finished, awaiting acknowledgement |
error |
Failed or interrupted |
idle |
Acknowledged, no outstanding work |
Only the foreground run can update a project's state; queued prompts do not
take over until execution starts. done persists until the companion
manager's ack.sh changes it to idle; error persists until new work starts.
@opencode_state_at records when the state was entered, not a heartbeat.
License
MIT
同类生态推荐
Cmux Status
opencode-cmux-status
OpenCode 2 plugin that surfaces agent activity in the cmux sidebar: status pills, progress, logs and notifications. Fork of opencode-tmux-session-status with the tmux backend replaced by cmux.
Tmux Indicator
opencode-tmux-indicator
OpenCode CLI plugin that sets a tmux window option when the agent is waiting for input
Tmux
@floschl/opencode-tmux
Minimal OpenCode plugin: auto-spawn tmux panes for subagent sessions