Skip to content
C.W.K.
Stream
Lesson 03 of 04 · published

Drafts Stay Outside the PTY

~12 min · anvil, firebrand, draft, pty, enter

Level 0Spark
0 XP0/36 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete

A Pane Is Not a Composer

Anvil preparation produces a draft. Firebrand idle-resume produces a draft. Both look, from a distance, like "put this text in the terminal." They are not. A PTY identity is not a conversation identity. The pane is a shell, or a vendor CLI, or a harness that happened to print a prompt. The draft is a document about a seat, a phase, a run. Glue those together with an automatic paste and a synthetic Enter, and you have submitted last seat's prompt into this seat's brain, or submitted a stale phase into a live one. Vendor CLIs do not expose a common empty-composer contract. There is no honest "the composer is empty now" signal to hang an automatic submit on.

So the draft stays in a native preparation view, outside the PTY. You can see it. You can copy it. You can look at the visible conversation in the pane. You paste. You press Enter yourself. The human is the join between two identities the machine cannot prove are the same. That is not ceremony. It is the only join that does not lie.

Copy, Inspect, Paste, Enter — All Yours

The bounded native handoff is allowed to be convenient. A button that copies. A layout that puts the draft next to the pane. A warning when the seat or the phase on the draft does not match the pane's declared identity. Convenience stops before the newline. The app does not press Enter. The app does not paste on a timer. The app does not wait for a prompt-ready heuristic and then fire. Heuristics on vendor CLIs are how you ship a submit into a pager, or into a confirmation, or into a password prompt.

Firebrand's idle resume is the same policy in a different coat. A coding engine that was waiting can be brought back to a pane. The text that should continue the work is still a draft until you put it there. Auto-resume that types is auto-submit that forgot its name. The pane may already have a partial line. The conversation may have moved. The only person who can see both at once, in the moment, is you.

The Door Still Does Not Type

It is tempting to punch a hole: let Anvil call a special input verb, just for drafts, just for seats. That hole is the generic input verb from the first lesson of this track, wearing a friendlier name. The door launches the pane. The preparation view holds the draft. The glass in between is the operator. If a future sibling cannot live with that, the answer is not a hole. The answer is a better preparation view — still outside the PTY — or a refusal to support a harness that cannot be prepared honestly.

The phone will inherit this exact policy. Track 6 will say Anvil on the phone uses the same preparation: drafts outside the PTY, refuse a stale phase. The phone does not get automatic Enter because the keyboard is smaller. If the Mac already synthesizes Enter, the pocket will too, and four Anvil seats on a train become four silent submits. Hold the line here, on the desktop, where you can see all four panes at once.

A PTY identity is not a conversation identity. Drafts stay outside the PTY. You copy, you inspect, you paste, you press Enter. Automatic Enter is how you submit the wrong thing into the wrong brain.

Code

The join the machine cannot prove, so it does not attempt·text
Anvil / Firebrand
  -> native preparation view   (draft, seat, phase, run)
  -> YOU copy
  -> YOU look at the pane      (visible conversation, cursor, pager?)
  -> YOU paste
  -> YOU press Enter

PTY identity     = this shell / this vendor CLI process
conversation id  = this seat's thread in that CLI, if any
They are not equal. There is no common "composer empty" signal.

# Forbidden joins
  auto-paste on launch
  auto-Enter on prompt-ready heuristic
  door.send(draft + newline)
  "just this once, for Anvil"

# Allowed convenience
  copy button on the draft
  warn if draft.seat != pane.declaredSeat
  warn if draft.phase is stale
  refuse to offer Enter-for-you

External links

Exercise

Write a story where auto-Enter would be wrong: a draft for seat B, a pane still showing seat A's pager, a prompt-looking last line. Name the three identities in play (PTY, conversation, draft). Then write the preparation-view warning you want, and the one key the app is still not allowed to press.
Hint
If your warning includes "we submitted it for you after a delay," you have built the heuristic. The only legal newline is the one a finger sends.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.