Skip to content

Concept: Preview owned terminal programs in Core and Async - #166

Draft
tony wants to merge 1 commit into
masterfrom
concept/owned-terminal-program
Draft

tony wants to merge 1 commit into
masterfrom
concept/owned-terminal-program

Conversation

@tony

@tony tony commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Refs #122.

What changed, and why:

Preview an owner for a terminal program on a dedicated tmux daemon. Core and Async accept literal argv, return the same program interface for input and resize, and let callers wait independently for an exit code or signal and a bounded final screen. The example reports an application failure with its UTF-8 diagnostic.

The preview requires tmux 3.7. In a 30-run probe, tmux 3.3a lost final output six times despite exit 0. Independent 100-run checks retained the final line on each of tmux 3.7 and 3.8. An older-tmux pipe prototype retained it in 30 runs. Its lifecycle and queue ordering remain open.

The owner retires the dedicated daemon and terminal. A process that ignores SIGHUP or detaches can survive. Borrowed-daemon generation checks, external respawn safety, descendant termination and MCP operations remain part of #122.

Checks run:

  • Program integration on Ruby 4.0.7 with tmux 3.7 and 3.8, including literal argv, exit and signal, final UTF-8, concurrent Async waiters, cancellation, and cleanup.
  • Program-specific refusal on 3.3a before session launch. The installed-artifact suite passed on 3.3a and 3.8.
  • The final failure-report example printed the expected diagnostic and status on 3.7 and 3.8, with the expected capability refusal on 3.3a (under 3s total).
  • scripts/check outer on Ruby 4.0.7 and tmux 3.8 (149s). Unit, integration, installed-artifact, RBS and rendered documentation checks passed. The older-tmux refusal case skipped as expected.

Tool use:

Codex and Sol 6.2 implemented the prototype and independently tested terminal drain, adapter isolation, deadline and cancellation, and cleanup. Codex checked the final diff, example, version decision, and repository gates.

why: A tmux command status does not report how a terminal program
finished or what it last displayed.

what:
- Share a dedicated program owner across core and Async.
- Retain bounded screen text and observe exit status or signal.
- Require tmux 3.7 for the program preview and verify refusal.

This branch was successfully deployed

1 active deployment
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