Isn't this the wrong architecture? Fundamentally, a coding agent should be running as a headless/detached process, a daemon. If it needs a CLI then that CLI can attach/connect to that daemon and interact with it. If you architect it that way then you can quit and resume the CLI anytime you want, from any machine you want and with whatever UI you want, the daemon doesn't care. Running the agent as an interactive CLI process which you need to stuff into something like tmux is just the wrong approach, and "connecting" to it by reading/scraping its screen is terrible.
Opencode works that way-ish.
Or, wrong by design. There is something about nudging users to use the claude CLI from which Anthropic extracts value. Otherwise they would not charge extra for "claude -p" or ACP access.
The tmux send-keys + terminal scrape is the LLM version of the analog hole of DRM'ed audio.