Skip to content

[docs] "Can I use tmux for coding?" has no correct answer in the docs — the architecture split is documented, the user-facing choice and its unmetered cost are not #433

Description

@serge-ivo

The docs are right about the architecture and silent about the choice — so "can I use tmux?" has no correct answer to look up

Filed after I gave the owner a wrong-in-effect answer twice in one session. Worth recording precisely, because the docs are not wrong — which is why this was hard to spot.

What the docs already get right (do not change these)

  • platform-docs/browser-runtime.md:102 — Coder runs the CLI as a child process over stream-json; "It is not a tmux pane, and the terminal view is not a scraped TUI."
  • platform-docs/browser-runtime.md:121"tmux is still used on this platform, but by a different family: the terminal connector… Those create real tmux sessions; Coder agents do not."
  • platform-docs/coder-multi-machine.md:118 — the coding_sessions.tmux_session column keeps its old name but stores an engine label.
  • platform-docs/connectors.md:42 — the tmux connector's tool list.

Every one of those is accurate. The architecture split is documented.

What is missing

1. Nowhere says a coding CLI can be driven through the terminal connector — which is the actual user-facing choice.

The docs say tmux "belongs to the terminal connector" and stop. They never state the thing that follows from it: a subscriber can point a tmux/kitty/iTerm2 Operator at a pane running Claude Code and drive it. That is a real, working, supported path — #348 exists because people do it — and the owner of this platform correctly remembered building it while the docs gave no way to confirm that.

So the question "is tmux available for coding?" has two true answers depending on which product you mean, and no document distinguishes them.

2. The single most decision-relevant fact is not in any doc.

grep -rn "unmetered" docs/ platform-docs/   →   no matches

A CLI driven through a pane produces no cost record at all. That is stated only in a source comment (packages/browser-runner/src/coding/terminal.ts:67-78):

"The platform cannot measure what an AI CLI inside a pane spends: a pane holds rendered text, not the stream-json result event headless.ts reads. So the cloud records the drive as UNMETERED… It is a name, never a number — no cost figure is ever parsed out of pane output, because a scraped dollar amount would be a guess dressed as a measurement."

This is exactly what a user weighing the two paths needs, and it is invisible unless you read the runner source. It also makes a whole class of question ("compare my tmux vs non-tmux spend") unanswerable — a fact worth stating once in a doc rather than rediscovering from a $0 row.

3. docs/coding-engines.md documents the engine presets and never mentions the alternative.

Its only tmux reference is a parenthetical about what "tmux used to provide" (:46). A reader choosing an engine has no pointer to the terminal-connector path, or to why they might want it (a real PTY, tmux attach from their own shell) or not (no metering, no structured turn boundary, scraped text).

4. #249 is an open decision no document references.

#249 — "Decide: should tmux return as a selectable Coder engine backend? (real PTY + attach)" is the ticket that would collapse the two paths into one. Nothing in the docs mentions that the current split is provisional, so a reader reasonably concludes it is settled.

What to write

A. A short section in docs/coding-engines.md: "Two ways to drive a CLI." A comparison table, because the differences are what matter:

Coder engine (child process) Terminal connector (tmux/kitty/iTerm2)
How it runs child process, stream-json a real pane on your machine
Turn boundary a result event — a fact inferred from rendered text
Cost recorded yes, from the CLI's own total_cost_usd (#267) no — unmetered by design (#348)
tmux attach from your shell no session to attach to yes
Which agents Coder tmux / kitty / iTerm2 Operators

B. One line in platform-docs/browser-runtime.md:121, after "Coder agents do not": say that terminal-operator agents can be pointed at a pane running a coding CLI, and link to (A).

C. State the metering consequence where cost is discussed, not only in terminal.ts. The Usage page's own docs are the right home: a total that silently excludes pane-driven work is misleading without the note.

D. Reference #249 from (A) so the split reads as a live decision rather than a settled boundary.

Evidence that this is a real doc defect and not just my error

I gave the owner two answers in this session that the docs did not prevent:

  1. "There's nothing to test — Coder does not use tmux." True, and useless: they had four Operator instances doing the thing they were asking about.
  2. "tmux is not available as an option." Wrong as stated. It is available, via a different agent family.

The owner's own recollection — "we even built a connector and an agent, I thought!" — was correct, and there was no document that would have confirmed it. When the person who commissioned the feature cannot look it up, the gap is in the docs, not in their memory.

Alternatives considered and rejected

Acceptance criteria

  • A reader can answer "can I use tmux to run a coding CLI?" from the published docs, with the trade-offs, without reading source.
  • The word "unmetered" (or its plain-English equivalent) appears where cost and where engine choice are documented.
  • docs/coding-engines.md links to the terminal-connector path, and browser-runtime.md links back.
  • Decide: should tmux return as a selectable Coder engine backend? (real PTY + attach) #249 is referenced as the open decision that would merge the two.
  • Nothing in the existing "Coder is not tmux" statements is weakened.

Related: #247 (removed tmux from Coder — the change these docs describe), #249 (the open decision), #348 (the unmetered finding that belongs in a doc), #267 (engine metering, the other half of the comparison).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2: correctnessReal defect, no live harm today — inert fields, miscounts, missing guardscoderThe Coder wedge agent (#68) — Engine, Pilot, Co-pilot, Loop, OverseerdocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions