Skip to content

Fix Codex shared-daemon pane routing - #18

Draft
accessd wants to merge 2 commits into
agent/add-notification-panelfrom
fix/codex-daemon-pane-routing
Draft

accessd wants to merge 2 commits into
agent/add-notification-panelfrom
fix/codex-daemon-pane-routing

Conversation

@accessd

@accessd accessd commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Codex's shared app-server inherits the first client's TMUX_PANE, so a turn finishing in another pane can style the wrong pane. Route hooks through the live native TUI title, confirm the full thread ID and session tree via read-only local daemon API calls, and pass the explicit tmux socket/pane to the existing state script. Embedded clients use the nearest native Codex ancestor's TTY.

Keep the limits test on its original Go module cache while it isolates HOME, avoiding read-only module cleanup failures on Linux.

The installer builds the adapter and migrates this plugin's old hooks without changing foreign hooks or title settings. Shared-daemon users must configure [tui] terminal_title = ["app-name", "thread-id"], restart clients, reload the plugin in every tmux server, and trust the installed hooks. Missing, stale, ambiguous, or unverifiable targets leave styles unchanged.

Stacked on #16 (agent/add-notification-panel); retarget to main after it merges.

Validation

  • ./tests/run-all.sh — passed, including routing, idempotent installer migration/uninstall, state transitions, focus resets, panel, and animation.
  • bash -n agent-indicator.tmux scripts/*.sh install.sh setup.sh tests/*.sh tests/lib/*.sh — passed.
  • shellcheck -x -S warning agent-indicator.tmux scripts/*.sh install.sh setup.sh tests/*.sh tests/lib/*.sh — passed.
  • env -u GOROOT go vet ./cmd/codex-hook — passed.
  • env -u GOROOT go test -race ./cmd/codex-hook — passed.
  • python3 tests/test-codex-hook-native.py "$HOME/.codex/packages/app-server-daemon/current/bin/codex" — passed with Codex 0.164.0: two real clients, one scratch daemon/cwd, production adapter with real API and synthetic hook payloads, all four states, duplicate/replaced/stale titles, false full session sharing the truncated prefix.

No inference requests or changes to user configuration, installed hooks, or live sessions. Automated assertions cover style isolation; no manual UX screenshots have been captured yet.

Before release

  • Verify actual automatic prompt/permission/stop delivery with trusted installed hooks.
  • Verify child-thread navigation, reconnect/resume, nested tmux, and separate registered tmux servers.
  • Capture styling screenshots from the manual UX check.

The adapter supports the default local control socket. Remote/custom endpoints and separate CODEX_HOME instances containing copied thread IDs are outside its supported configuration. Hook session IDs identify a session tree, so background descendants cannot be distinguished from the displayed thread within that tree. Details and reproducible checks: docs/CODEX-DAEMON-PANE-BINDING.md.

Resolve daemon hooks through native client titles and verified full thread/session IDs instead of inherited TMUX_PANE. Keep embedded clients bound to their ancestor TTY and skip ambiguous or stale targets.

Register tmux servers at plugin bootstrap, migrate Codex hooks during installation, and document the required title configuration. Cover routing with isolated tmux/WebSocket tests and two real Codex 0.164.0 clients; retain manual lifecycle checks before release.
@accessd accessd self-assigned this Oct 26, 2026
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.

1 participant