Skip to content

chat: a waiting message stays with its conversation when you leave, and still goes when the answer ends - #1385

Merged
AbirAbbas merged 4 commits into
devfrom
esc-parked-message
Sep 22, 2026
Merged

AbirAbbas merged 4 commits into
devfrom
esc-parked-message

Conversation

@AbirAbbas

Copy link
Copy Markdown
Collaborator

Santosh's report (Slack, 2026-09-22): "esc when a message is waiting does not seem to send it, it seems to just cancel the running one … not sure if this is only when image is attached for followup".

What was happening

Since #1071 esc opens Home, and Home stands the cursor on the conversation before this one, so the reflex esc, enter is a switch to the previous chat. That switch folded every message waiting above the box into the draft, dropped the picture parked with it, and left nothing to send when the answer ended. Coming back, the follow-up sat in the box as unsent text without its picture, and the turn's close sent nothing.

Reproduced with the real binary in tmux on dev c084b60, on both the in-process road (--no-host) and the engine road: park a follow-up with a picture (plain enter parks when a picture is attached; words alone steer into the running turn instead, which is why it looked picture-only), esc, enter, come back: the block is gone, the box reads the words only, the transcript never gets the message.

What changes

  • The parked queue travels on the aside as itself — words, pictures, pasted documents, standing mark, order — and comes back as the same waiting block with the same hint line. The box keeps only what was typed and unsent before leaving.
  • When the turn ends while the conversation is held behind the screen, its watcher's landing edge sends the oldest parked message through the held agent, using the same submit, picture, standing and remote-file doors a front send uses (parkedStart), and adopts the returned stream so the next close is the next edge. One message per finished turn, oldest first.
  • Session follow-ups (ctrl+q) still go first: Attach is asked before a parked send, and a running answer is adopted instead of jumped.
  • A turn already idle at the stow sends at once. A failed send stays parked with its attachments and notes submit failed: … in its own conversation. A send that is crossing while the person comes back is marked so it cannot go twice. The quiet sweep never collects a conversation with something waiting.
  • The shared-handle door (a --host that cannot dial again) still folds the words into the box because its engine ends the conversation on the swap, and now brings the parked pictures and pastes back onto the tray with them.
  • Quitting is unchanged: the draft file still gets the box plus every waiting message's words.
  • Manual: the waiting-block page and the Escape section say what leaving does, that /new keeps a waiting message with the conversation it was typed in, and name the shared-handle exception; two probes in a person's words reach the page. Stale esc stops comments in park.go, followup.go, bargein.go and spellout.go now say ctrl+c or Home.

Verification

  • Contract tests in internal/tui3/parkkeep_test.go, switch_test.go, sharedagent_test.go, keptsweep_test.go: the queue survives a switch structurally; a picture message is sent through the held agent, not the front one; follow-ups first, one per landing, never twice; idle-at-stow sends now; shared-handle folding keeps chips and pastes; the crash draft keeps the words; a failed send stays parked.
  • Hand runs with the real binary and a real model, both roads: park a picture follow-up, esc, enter onto the previous chat, come back mid-turn — the block is back with [#1 red.png] and the message goes at the close; stay away until the turn ends — the message is sent behind the screen and the answer is there on return. Transcripts checked.
  • make pr-ready green (see the checks).

Not changed here: a picture message replayed from the journal draws the session's [attached image: …] sentence beside the chip marker, which is how any resumed picture message already draws.

🤖 Generated with Claude Code

AbirAbbas and others added 4 commits September 22, 2026 14:27
…nd still goes when the answer ends

Since #1071 esc opens Home, and Home stands the cursor on the conversation
before this one, so esc then enter is a switch. A switch folded every message
parked above the box into the draft (leaving.go's quitting assembly), dropped
the pictures parked with it, and left nothing to send when the answer ended:
the person came back to their follow-up sitting in the box as unsent text
without its picture, and the turn's close sent nothing. Santosh read that as
"esc cancels the running one and never sends the waiting message".

The parked queue now travels on the aside as itself — words, pictures, pasted
documents, standing mark, order — and comes back as the same waiting block.
When the turn ends while the conversation is held behind the screen, its
watcher's landing edge sends the oldest parked message through the HELD agent
(the same submit, picture, standing and remote-file doors a front send uses,
factored into parkedStart) and adopts the returned stream so the next close
is the next edge. Session follow-ups still go first: Attach is asked before a
parked send and a running answer is adopted instead. A turn already idle at
the stow sends at once; a failed send stays parked with its attachments and
notes the failure in its own conversation; a crossing send is marked so
coming back mid-send cannot send it twice; the quiet sweep keeps a
conversation with anything waiting. The shared-handle door still folds the
words into the box, because its engine ends the conversation on the swap, but
now brings the parked pictures and pastes back to the tray with them.
Quitting still writes the words into the draft file as before.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…another chat

The waiting-block page said esc removed the block and that /new dropped what
was waiting; neither has been true since esc became Home. It now says the
message keeps waiting with its pictures, goes when its answer ends even from
Home or another conversation, that /new keeps it with the conversation it was
typed in, and that a connection holding one conversation at a time is the
exception. The Escape section says the same in one sentence, and two probes
in a person's words reach the page.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@AbirAbbas
AbirAbbas merged commit ea9e1d9 into dev Sep 22, 2026
4 checks passed
@AbirAbbas
AbirAbbas deleted the esc-parked-message branch September 22, 2026 20:05
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