Skip to content
Agentmart
Submit a tool

tmux-status-debug

Debug and test tmux pane status detection for AI agents (opencode, claude, amp).

Skill by edmundmiller

IndexedMIT★ 80
Write a review

Chalk Labs

Need help deploying tmux-status-debug?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/edmundmiller-tmux-status-debug

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Debug and test tmux pane status detection for AI agents (opencode, claude, amp). Use when patterns aren't matching, status icons are wrong, or adding new detection patterns.

Use cases: testing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/tmux-status-debug

What's inside

Skill name
tmux-status-debug
Description
Debug and test tmux pane status detection for AI agents (opencode, claude, amp). Use when patterns aren't matching, status icons are wrong, or adding new detection patterns.
License
MIT
Instructions
135 lines in SKILL.md · view on GitHub

Agent Skills spec issues

  • body: contains an absolute path from the author's machine

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Debugging tmux-opencode-integrated Status Detection

## When to Use

- Status icons showing wrong state (e.g., showing ERROR when agent is IDLE)
- Adding new patterns for agent detection
- Testing pattern matching against real pane content

## Quick Commands

### List all agent panes

```bash
tmux list-panes -a -F "#{session_name}:#{window_name}.#{pane_index} #{pane_current_command}" | grep -E "opencode|claude|amp"
```

### Capture pane content (raw)

```bash
tmux capture-pane -t "main:1" -p -S -30 | tail -40
```

### Capture with control chars visible

```bash
tmux capture-pane -t "main:1" -p -S -30 | cat -v | tail -40
```

### Check if pattern exists in pane

```bash
tmux capture-pane -t "main:1" -p -S -20 | grep -o "pattern"
```

## Debug Script

Create `/tmp/debug_status.py` and run with the Nix Python that has libtmux:

```python
import sys
sys.path.insert(0, "/Users/emiller/.config/dotfiles/packages/tmux-opencode-integrated/scripts")
import smart_name
import re

import libtmux
server = libtmux.Server()
for session in server.sessions:
    for window in session.windows:
        for pane in window.panes:
            program = smart_name.get_pane_program(pane)
            if program in smart_name.AGENT_PROGRAMS:
                print(f"\n=== {program} in {session.name}:{window.name} ===")
                try:
                    cmd_output = pane.cmd("capture-pane", "-p", "-S", "-20").stdout
                    if isinstance(cmd_output, list):
                        content = "\n".join(cmd_output)
                    else:
                        content = str(cmd_output)

                    cleaned = smart_name.strip_ansi_and_control(content)
                    print(f"Last 300 chars (cleaned):\n{cleaned[-300:]}")
                    print(f"\n--- Status: {smart_name.get_opencode_status(pane)} ---")
                except Exception as e:
                    print(f"Error: {e}")
```

### Find the Nix Python with libtmux

```bash
# Build the package and get the store path
nix build .#tmux-opencode-integrated --no-link --print-out-paths

# Check wrapper to find Python path
head -10 /nix/store/<hash>-tmux-opencode-integrated-*/share/tmux-plugins/tmux-opencode-integrated/scripts/smart-name.sh

# Run debug script with that Python
/nix/store/<python-hash>-python3-*-env/bin/python3 /tmp/debug_status.py
```

## Pattern Testing

Test patterns against sample content:

```python
import re

content = """ctrl+t variants  tab agents  ctrl+p commands    • OpenCode 1.1.30"""

patterns = [
    (r"OpenCode \d+\.\d+\.\d+", "IDLE - version"),
    (r"ctrl\+p commands", "IDLE - status bar"),
    (r"esc interrupt", "BUSY - can interrupt"),
    (r"Esc to cancel", "BUSY - can cancel"),
    (r"■■■", "BUSY - progress bar"),
]

for pattern, desc in patterns:
    if re.search(pattern, content, re.IGNORECASE):
        print(f"✓ {desc}: {pattern}")
```

## Status Priority

Order matters - first match wins:

1. **ERROR** - Traceback, panic, FATAL ERROR, API errors
2. **WAITING** - Allow once?, Permission required, yes/no/skip prompts
3. **BUSY** - Thinking..., spinners, Running tools, esc interrupt
4. **IDLE** - Input prompt, context display, OpenCode version, ctrl+p commands
5. **UNKNOWN** - No patterns matched (fallback)

## Adding New Patterns

1. Capture real pane content with the debug script above
2. Identify unique text that indicates the state
3. Add pattern to appropriate list in `smart_name.py`
4. Add test case in `tests/test_smart_name.py`
5. Run tests: `uvx pytest tests/test_smart_name.py -v`
6. Rebuild: `nix build .#tmux-opencode-integrated`

From edmundmiller/dotfiles, MIT.

More from edmundmiller/dotfiles

Signals

Stars
80
Forks
6
Open issues
4
Last commit (this folder)
Jan 30, 2026 (9 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from edmundmiller

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get tmux-status-debug running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying tmux-status-debug?

CallGet help
Cite this page

tmux-status-debug skill. Agent Mart. https://agentmart.dev/skills/edmundmiller-tmux-status-debug (last updated 2026-10-24)