Skip to content

Submit a composer message with its own Enter, after the text - #15

Merged
devswha merged 5 commits into
devswha:mainfrom
Yoonwoo-Ha:fix/composer-separate-submit
Sep 24, 2026
Merged

devswha merged 5 commits into
devswha:mainfrom
Yoonwoo-Ha:fix/composer-separate-submit

Conversation

@Yoonwoo-Ha

@Yoonwoo-Ha Yoonwoo-Ha commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

On a phone, the chat sometimes left a sent message sitting unsent in the agent's input box, followed by a newline, and the user had to press Enter in the terminal to send it. The cause: the composer sent the text and the submitting CR in one chunk. How the TUI read that CR depended on whether it was still handling the paste, for example turning an image path into an attachment or redrawing after the phone keyboard closed. chatmux, which has never shown this problem, pastes the text and then sends tmux a separate Enter.

The whole send now happens on the server:

  • A submit frame. An agent pane gets the message through herdr's agent.prompt: the paste, then Enter 300ms later, returning after the Enter. agent.prompt also refuses (agent_blocked) while the agent waits for an answer, so a message is never typed into a question or approval menu. The exception is a Codex that herdr calls blocked only because questions wait collapsed in its queue: its main prompt still takes the message. That exception applies only for a Codex agent, with no prompt parsed on screen and the main prompt right under the queue, so an approval never gets the message. A pane without an agent in front (agent_not_found / agent_not_ready) gets the paste-mode payload through send_text, then Enter 120ms later. Both paths return once the pane has the bytes, so the pane sees the whole gap even on a jittery connection.
  • A submit-result for every submit. The composer keeps its text until the pane has the message and its Enter. On failure the text stays, with the reason: agent waiting for an answer, read-only view, pane gone, connection dropped, or no answer in 30s.
  • Ordering. While a message is in flight, the pane's other input waits behind it: keystrokes, keys frames and prompt answers. Queued keystrokes also go through send_text, because herdr holds a lone ESC typed through the attach pty for about 150ms (to tell it from Alt+key). Otherwise a Stop tapped right after Send would still arrive after the next message. For the same reason a message waits 200ms after the pane's last keystroke, so a Stop tapped just before Send lands first.
  • The send survives the phone. Once the frame reaches the server, the send completes even if the phone locks or the socket drops right after the tap.
  • Ctrl can't hijack a message. Composer text goes straight to the socket, not through the terminal's onData, so an armed key-bar Ctrl can't turn a one-letter message into a control key.
  • Old bridges still work. The server lists features: ["submit"] in its first snapshot. An older remote bridge lists nothing, and the client falls back to main's single input frame (text plus CR). Right after a reconnect, a Send waits up to 2s for that snapshot.

Testing

  • bun run typecheck is clean; bun test: 292 pass.
  • server/submit.contract.test.ts runs raw-mode input recorders in real herdr panes: a plain program, and one run as claude so that agent.prompt applies. It checks:
    • the text and its Enter arrive as separate chunks, on both paths
    • agent_blocked types nothing
    • Send then Stop, and Stop then Send, both arrive in order (each fails without its part of the change)
    • the send completes after the sender disconnects
    • an observe connection gets read_only
  • End to end, on a live Claude Code pane from a headless Chrome chat view, with an image mention:
    • 3/3 submitted
    • 2/2 submitted with the view resized while sending
    • 2/2 submitted with the feature stripped from the snapshot (legacy path)
  • With Claude waiting on a question, a message stays in the box with "the agent is waiting for an answer", and nothing reaches the menu.
  • With Ctrl armed, a one-letter message is still sent as text.
  • I couldn't reproduce the phone failure itself on demand. The change follows chatmux's proven order and keeps the gap regardless of the connection.

🤖 Generated with Claude Code

@devswha devswha left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ordering is sound: text and Enter share the socket and the server writes frames in order. Three things before merge:

  1. Regression: an armed Ctrl turns a one-letter message into a control key. Outside bracketed paste, "c" is now sent as the single character c. On main it was c\r. If Ctrl is still armed from the terminal key bar (arming survives a lens or pane switch), onData turns it into Ctrl+C, and then Enter follows. Please send composer text with socket.sendInput directly, bypassing the modifier.
  2. The 120ms gap exists only in the browser. On a jittery phone connection both frames can arrive together and be written back to back, which is the combined chunk this PR is trying to avoid. And the original failure wasn't reproduced. Please put the gap on the server side instead, for example through the existing keys/paneSendKeys path.
  3. The Enter can be dropped silently. If iOS freezes the timer (phone locked or app backgrounded right after sending), or the socket is gone when it fires, the Enter is skipped. The composer has already cleared and reported success, so the text sits unsent in the agent's input box. Please surface this, or do the whole send on the server.

Minor: two sends within 120ms paste both texts before either Enter.

@Yoonwoo-Ha
Yoonwoo-Ha force-pushed the fix/composer-separate-submit branch from 5f8de37 to 329bd1f Compare September 24, 2026 10:25
@Yoonwoo-Ha

Copy link
Copy Markdown
Contributor Author

Thanks. Reworked in 329bd1f (rebased onto main):

  1. Ctrl. Composer text now goes straight to the socket (HerdrSocket.submit), not through onData, so an armed key-bar Ctrl doesn't touch it. Checked in a phone-sized browser: with Ctrl armed, sending "c" from chat produces one submit frame with the text and no ^C.
  2. Gap on the server. There is a new submit frame: the server calls herdr's pane.send_text, waits 120ms, then calls pane.send_keys ["Enter"]. My first version wrote the text through the attach pty, but in one run the pane saw the gap shrink to 54ms, because that extra hop delays the text. With the RPCs, the recorder in the pane measured 120–121ms on every run. Sends to one pane are queued, so two quick sends arrive as text1, Enter, text2, Enter. This also covers the minor point.
  3. Dropped Enter. The browser no longer holds a timer. Once the frame reaches the server, the send completes, even if the socket closes right after. There is a test for this.

Compatibility. The server lists features: ["submit"] in its first snapshot. An older remote bridge lists nothing, and the client falls back to main's single frame (text + CR).

Tests. server/submit.contract.test.ts runs a raw-mode input recorder in a real herdr pane. It checks that the text and Enter arrive as separate chunks at least 100ms apart, that queued sends stay in order, that the send completes after the sender disconnects, and that observers are refused. Live Claude with an image mention: 3/3 submitted, 2/2 with a viewport resize during the send, and 2/2 with the feature stripped from the snapshot (legacy path). bun test: 273 pass.

I still haven't reproduced the original failure on demand. This change makes the gap hold regardless of the connection.

@Yoonwoo-Ha
Yoonwoo-Ha force-pushed the fix/composer-separate-submit branch from 329bd1f to 749a0a4 Compare September 24, 2026 10:50

@devswha devswha left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Ctrl bypass, the server-side gap and back-to-back sends are all fixed. One ordering regression before merge:

  1. Other input can land between the text and its Enter. submit goes through the per-pane queue with a 120ms server sleep, but input frames still go straight to the pty (server/index.ts ~854), and prompt answers (prompt.ts) skip the queue too. Scenario: tap Send, then Stop within about 120ms. The Escape from abortTurn reaches the pane between the text and the Enter, or before the text. On main, everything reached the pty in order. Please send input frames and prompt answers through the same per-pane queue while a submit is in flight.
  2. A server-side failure is still silent. If the pane closes during the gap or the RPC times out, the error only goes to term.writeln, which the chat lens hides, and the composer has already cleared. Please ack submit back to the client and restore the draft on failure.
  3. Question: herdr already has an agent.prompt RPC. It handles bracketed paste, sends a delayed Enter and refuses with agent_blocked. Could the bridge use it instead of re-implementing the same thing?

Minor: right after a reconnect, connected is true before the snapshot arrives, so a Send in that window takes the old single-frame path. A Send while an observe switch waits for its ack is rejected without notice.

@Yoonwoo-Ha
Yoonwoo-Ha force-pushed the fix/composer-separate-submit branch from 749a0a4 to 7046df5 Compare September 24, 2026 12:14
@Yoonwoo-Ha

Copy link
Copy Markdown
Contributor Author

Thanks. Addressed in 7046df5, rebased onto main:

  1. Ordering. While a submit is in flight, the pane's other input waits in the same per-pane queue: input, keys and prompt answers (the answer handler takes a serialize option). One catch showed up in testing. herdr holds a lone ESC typed through the attach pty for about 150ms to tell it from Alt+key (measured), so queued keystrokes go through send_text like the message, which arrives at once. For the same reason, a submit waits 200ms after the pane's last attach keystroke, so a Stop tapped just before Send still lands first. Both orders have a contract test, and each fails without its part of the change.
  2. Failures are reported. Every submit gets a submit-result. The composer keeps its text until ok. On failure the text stays with the reason: read-only, pane gone, connection dropped before the answer, or no answer in 30s. The minor case is covered too: a Send during an observe switch now gets read_only back instead of being dropped silently.
  3. agent.prompt: yes. An agent pane now uses it. I measured it on a stand-in agent: the paste, then Enter 300ms later, and it returns after the Enter. Its agent_blocked refusal is a real gain. Checked live on Claude with a question open: the message stays in the chat box with "the agent is waiting for an answer", and nothing is typed into the menu. agent_not_found / agent_not_ready (a shell, or no agent in front) fall back to send_text, the gap, then Enter, so the protocol carries both the message and the paste-mode payload.

Minor. After a reconnect, a Send waits up to 2s for the snapshot before it picks a path.

Checked live:

  • Claude with an image mention: 3/3, with a resize 2/2, with the feature stripped (legacy path) 2/2.
  • Ctrl armed: still sent as text.

bun test: 279 pass.

@Yoonwoo-Ha

Copy link
Copy Markdown
Contributor Author

One more commit (03f523c), found while testing this together with #6 on a live Codex 0.156.1 pane.

herdr reports Codex as blocked while questions asked with request_user_input_async wait collapsed above its main prompt. So agent.prompt refused a message that the TUI would take; Codex then drops those questions. When agent.prompt answers agent_blocked and the screen shows only that collapsed queue, the message now goes through send_text with its own Enter. An open question (its "enter submit … skip" hint means it holds the input) is still refused. A contract test runs a stand-in codex that is reported blocked and shows the collapsed queue. It fails without the change.

@Yoonwoo-Ha

Copy link
Copy Markdown
Contributor Author

Note on merge order: #6 and #15 both touch server/prompt.ts. #6 adds a codexHome option to handlePromptRequest, #15 adds serialize, and each has its own check for "Codex's question queue is collapsed". Whichever you merge first, I'll rebase the other right after. If #6 goes first, #15 will use #6's queuedQuestionCount instead of its own codexQuestionsCollapsed, so the queue is detected in one place.

@devswha devswha left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Ordering, failure reporting and agent.prompt are all in, and older bridges stay compatible. One blocker from 03f523c, plus a few smaller issues:

  1. A message can be typed into a Codex approval menu (server/prompt.ts ~393, server/index.ts ~205). codexQuestionsCollapsed only looks for the collapsed queue text and the absence of the "enter submit … skip" hint. It never checks for another open prompt. Async questions don't stop the turn, so a collapsed queue can sit above "Would you like to run the following command? … Press enter to confirm". On that screen it returns true, the message goes out through send_text + Enter, letters like y or p act as approval shortcuts, and Enter confirms "Yes, proceed". It also never checks that the pane runs Codex. Please also require parseInteractivePrompt("codex", screen) === null and a Codex agent.
  2. Flaky test (server/submit.contract.test.ts:123). It assumes the first frame is snapshot, but a pane-status often arrives first. It failed in 3 of 6 solo runs and once in the full suite. Please wait for the snapshot frame by type.
  3. A late submit after the client gives up. A fallback submit can make up to four 10s RPCs, about 40s, but the client stops waiting at 30s and keeps the text. The server can still send the Enter later, so a resend goes twice. Please cap the server side below the client timeout, or have the client wait for the final submit-result.
  4. "Send now" can be double-tapped (PaneTerminal.tsx ~594). It is only disabled while disconnected, not while a submit is in flight.
  5. Edits made while sending are lost. The box stays editable while waiting, and ok clears whatever was typed in the meantime. Please lock the box, or clear only the text that was sent.

Nits: queued input skips the attached-pane check, submit doesn't validate pane_id, and lastTyped is never pruned. The 200ms wait after the last keystroke is only 50ms above herdr's measured ~150ms ESC hold.

Yoonwoo-Ha and others added 5 commits September 24, 2026 23:13
From a phone the chat now and then left a message sitting in the agent's
input box with a newline instead of sending it, and it had to be sent with
Enter from the terminal. The text and the submitting CR went in one chunk,
so how the CR was read depended on how the TUI parsed that chunk while
still busy with the paste (turning an image path into an attachment,
redrawing after the phone keyboard closed). chatmux, which never showed
this, pastes and then sends tmux a separate Enter. The composer now types
the text, then 120ms later the CR on its own, and only into the pane that
got the text.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Review follow-up. The composer's text and its Enter are now sent by the
server, not timed in the browser:

- New "submit" frame: the server types the text with herdr's send_text,
  waits SUBMIT_DELAY_MS, then sends Enter with send_keys. Both calls return
  once the pane has the bytes, so the pane sees the full 120ms gap even on a
  jittery connection (writing through the attach pty shrank it to 54ms in
  one run). Messages to one pane queue, so a quick second send cannot land
  before the first one's Enter.
- The send completes even if the phone locks or the socket drops right
  after the tap. The browser no longer holds a timer that can be frozen.
- The composer goes straight to the socket, not through onData, so an
  armed key-bar Ctrl can no longer turn a one-letter message into ^C.
- The server lists "submit" in its first snapshot (features). An older
  bridge lists nothing, and the client falls back to main's single input
  frame (text plus CR).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ort how it went

Review follow-ups:

- Ordering. While a composer message is in flight, the pane's other input
  waits behind it: keystrokes, keys frames and prompt answers go through
  the same per-pane queue. Queued keystrokes go through send_text, like
  the message: herdr holds a lone ESC typed through the attach pty ~150ms
  to tell it from Alt+key (measured), so a Stop tapped right after Send
  still arrived after the next message. For the same reason a message
  waits 200ms after the pane's last keystroke, so a Stop tapped just
  before Send reaches the pane first. Tests cover both orders; each fails
  without its part of the change.
- Every submit is answered with a submit-result. The composer keeps the
  text until the pane has the message and its Enter. If the message did
  not go (read-only view, the pane gone, the connection dropped before
  the answer, no answer in 30s), the text stays with the reason. An old
  bridge without the "submit" feature still gets the single frame.
- herdr's agent.prompt now sends to an agent: the paste, then Enter 300ms
  later, returning after the Enter. It also refuses with agent_blocked
  while the agent waits for an answer, so a message is never typed into
  a question or approval menu. Checked live: the text stays in the chat
  box with "the agent is waiting for an answer". A pane without an agent
  in front (agent_not_found / agent_not_ready) still gets send_text, the
  gap, then Enter.
- Right after a reconnect, a Send waits (up to 2s) for the snapshot that
  says whether the server takes "submit", instead of taking the old path.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… queue

herdr reports Codex blocked while questions asked with
request_user_input_async wait collapsed above its main prompt, so
agent.prompt refused a message the TUI would take (Codex then drops the
questions). When agent.prompt answers agent_blocked and the screen shows
only that collapsed queue, the message goes through send_text and its own
Enter. An open question, whose "enter submit … skip" hint means it holds
the input, is still refused.

Found while checking this with devswha#6's queue cards on a live Codex 0.156.1
pane. A contract test runs a stand-in `codex` reported blocked that shows
the collapsed queue, and fails without this change.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Review follow-ups:

- Blocker from 03f523c: a Codex blocked only by its collapsed question
  queue got the message through send_text, but the check looked only at
  the queue text. With an approval under the queue, "y" or Enter would
  have answered it. The fallback now requires a Codex agent, no prompt
  parsed on screen, and the main prompt (›) right under the queue's
  "alt+↑ to answer" line. A contract test with an approval under the queue,
  and one with a non-Codex agent showing the same text, types nothing. It
  fails without this change.
- The snapshot test finds the snapshot by type: a pane-status can arrive
  first (6/6 runs pass now).
- The client waits 60s for a submit-result, longer than the server can
  take (four 10s RPCs), so a message it gave up on is never submitted
  later.
- "Send now" is disabled while its send is in flight.
- Text typed while a message was on its way stays in the box: only what
  was sent leaves it (checked in a browser).
- Nits: queued keystrokes also require an attached pane, a submit's
  pane_id is validated, lastTyped is pruned, and the wait after the pane's
  last keystroke is 300ms (herdr holds a lone ESC ~150ms).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Yoonwoo-Ha added a commit to Yoonwoo-Ha/herdr-web-ui that referenced this pull request Sep 24, 2026
…a time

Review follow-ups:

- The queue is never left open by the chat. When it opens on another
  question than the card's, or does not open within 2s, it is closed
  again (alt+↓), and the question it opened on is remembered, so the next
  card shows that one instead of the rollout's newest-first guess (a
  skipped question leaves that guess wrong). After an answer, the queue
  closes only once a different question shows, never on the stale screen
  of the one just answered. Checked on Codex 0.156.1: alt+↓ on the main
  prompt or an approval changes nothing.
- An open queue is card-only too (`queued: "open"`). It holds the
  terminal's input, so the composer sends nothing while it shows and
  says why, rather than typing the message into the question. A
  collapsed queue (`queued: "collapsed"`) still leaves the composer
  talking to Codex.
- Concurrent polls of one rollout share a single scan, and the scan is
  built on a copy and kept only once complete. Two viewers, or a poll
  overlapping an answer, no longer push the same questions twice. There is
  a test that fails with the old scanner.
- An MCP call ("● server - tool (MCP)(…)") anchors a Claude approval's
  panel like any tool call.
- Text typed in the composer while a message was on its way stays: only
  what was sent leaves the box (as in devswha#15).

Checked live on Codex 0.156.1:
- With the queue opened in the terminal, a chat message was held with the
  reason and nothing reached the question. The card answered it.
- With the second of two questions skipped, the card's guess (Beta?)
  answered nothing, the queue closed, and the next card showed Alpha?,
  which the card then answered.
- The earlier flows (tap, free-form, message box to Codex) still pass.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@Yoonwoo-Ha
Yoonwoo-Ha force-pushed the fix/composer-separate-submit branch from 03f523c to 2b2ae07 Compare September 24, 2026 14:31
@Yoonwoo-Ha

Copy link
Copy Markdown
Contributor Author

Thanks. Addressed in 2b2ae07, rebased onto main:

  1. Approvals. The collapsed-queue fallback now requires all three: the pane's agent is Codex, no prompt is parsed on screen, and the main prompt (›) sits right under the queue's "alt+↑ to answer" line. Two new contract tests type nothing and fail without the change: one with an approval under the queue, one with a non-Codex agent showing the same text. I also checked it live on Codex 0.156.1. A question was queued, then Codex asked to run rm -rf junk2. A submit of "y" came back agent_blocked, the approval kept waiting, and junk2 was untouched. On the real screen, the approval replaced the queue's lines altogether.
  2. Flaky test. The snapshot is now found by its type. It passed 6/6 solo runs and the full suite.
  3. Late submit. The client now waits 60s for the submit-result, longer than the server can take (four 10s RPCs), so a message it gave up on is never submitted later.
  4. "Send now". The button is disabled while its send is in flight.
  5. Edits while sending. Only what was sent leaves the box, and text added meanwhile stays. Checked in a browser.

Nits.

  • Queued keystrokes also require an attached pane.
  • pane_id is validated.
  • lastTyped is pruned (and cleared after a submit).
  • The wait after the last keystroke is now 300ms.

bun test passes.

@devswha
devswha merged commit bcda6ef into devswha:main Sep 24, 2026
@devswha

devswha commented Sep 24, 2026

Copy link
Copy Markdown
Owner

Merged. Thanks. The approval fallback holds for every question, approval and menu screen I could come up with, and the submit contract test passed 8/8 solo runs.

Follow-ups for a separate PR:

  1. A queued submit can still land after its client gave up. serialize puts each submit behind the pane's earlier work, but the client's 60s timer starts when the frame is sent (src/lib/ws.ts ~229). The fallback is 5 RPCs, not 4 (agent.prompt returning agent_blocked, snapshot, pane.read, send_text, send_keys), about 50s worst case. So if submit A stalls for about 50s, submit B waits behind it. B's client stops waiting at 60s and keeps the text, then the server sends B at around 100s, and a resend goes twice. Please stamp each submit on arrival and answer timeout without sending if about 50s have passed before its send_text.
  2. › check. An unparsed numbered menu (› 1. …) right under the queue line would pass codexQuestionsCollapsed. ^›\s(?!\d+\.) is a cheap guard.
  3. Minor. Editing inside the sent part while it's in flight clears nothing, so a resend duplicates it. Leading whitespace of text typed after the sent part is also dropped.

devswha added a commit that referenced this pull request Sep 24, 2026
Since #15 a composer message goes out as a "submit" frame on servers that
list it, not as "input". The regression only counted "input" frames, so its
two hold checks passed without checking anything and the explicit send timed
out. It now counts both.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Yoonwoo-Ha added a commit to Yoonwoo-Ha/herdr-web-ui that referenced this pull request Sep 24, 2026
…a time

Review follow-ups:

- The queue is never left open by the chat. When it opens on another
  question than the card's, or does not open within 2s, it is closed
  again (alt+↓), and the question it opened on is remembered, so the next
  card shows that one instead of the rollout's newest-first guess (a
  skipped question leaves that guess wrong). After an answer, the queue
  closes only once a different question shows, never on the stale screen
  of the one just answered. Checked on Codex 0.156.1: alt+↓ on the main
  prompt or an approval changes nothing.
- An open queue is card-only too (`queued: "open"`). It holds the
  terminal's input, so the composer sends nothing while it shows and
  says why, rather than typing the message into the question. A
  collapsed queue (`queued: "collapsed"`) still leaves the composer
  talking to Codex.
- Concurrent polls of one rollout share a single scan, and the scan is
  built on a copy and kept only once complete. Two viewers, or a poll
  overlapping an answer, no longer push the same questions twice. There is
  a test that fails with the old scanner.
- An MCP call ("● server - tool (MCP)(…)") anchors a Claude approval's
  panel like any tool call.
- Text typed in the composer while a message was on its way stays: only
  what was sent leaves the box (as in devswha#15).

Checked live on Codex 0.156.1:
- With the queue opened in the terminal, a chat message was held with the
  reason and nothing reached the question. The card answered it.
- With the second of two questions skipped, the card's guess (Beta?)
  answered nothing, the queue closed, and the next card showed Alpha?,
  which the card then answered.
- The earlier flows (tap, free-form, message box to Codex) still pass.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Yoonwoo-Ha added a commit to Yoonwoo-Ha/herdr-web-ui that referenced this pull request Sep 24, 2026
Rebased onto main (devswha#15 and devswha#20 merged). The whole answer runs inside
devswha#15's per-pane serialize: read, open the queue, keys, close. A composer
submit can't land between them.

Review follow-ups:
- "Send now" on a held message goes through the same check as the
  composer. It is disabled, with the reason as its title, while Codex's
  queue is open in the terminal.
- The remembered question (the one the queue really opened on) is
  matched by title and options, the newest such one. It is dropped when
  the pane's rollout changes. An older skipped question with the same
  title no longer takes its place.
- closeQueue tells the question just answered from its twin by prompt id,
  and after 600ms treats an identical question still open as the next one
  (Codex takes the Enter at once). Two questions with the same title and
  options no longer leave the queue open.

Checked live on Codex 0.156.1: two identical queued questions, each
answered from its card, with the queue folded back to "? 1 question" in
between. The earlier queue flows still pass.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@Yoonwoo-Ha

Copy link
Copy Markdown
Contributor Author

Thanks. The follow-ups are in #23:

  • Deadline. A submit is stamped on arrival, and nothing of it is typed after 45s; it answers submit_timeout. The client waits 90s. There is a contract test with a 50ms deadline.
  • › guard. The main-prompt check now uses ^›\s(?!\d+\.).
  • Composer. Leading whitespace of text typed after the sent part is kept. An edit inside the sent part stays in the box, with a note that it was not sent (checked in a browser).

devswha pushed a commit that referenced this pull request Sep 24, 2026
From the merge reviews.

#15 (composer submit):
- A submit is stamped when it reaches the server. Nothing of it is typed
  once 45s have passed, whether it waited behind a stalled message in the
  pane's queue or not: it answers submit_timeout ("nothing was typed").
  A send that starts in time ends within two more 10s RPCs, and the
  client now waits 90s, so a message it gave up on never reaches the pane
  later. A contract test with a 50ms deadline fails without the check.
- The collapsed-queue fallback no longer takes a numbered menu row
  (`› 1. …`) under the queue for the main prompt.
- Text typed after the sent part keeps its leading whitespace. An edit
  inside the sent part while it was on its way stays in the box with a
  note that it was not sent, rather than silently waiting for a resend
  that would duplicate it (checked in a browser).

#20 (Codex bindings):
- The claim trade-off is written down where it lives: the other pane's
  first message must still be in its last 400 lines and read as 8+
  letters or digits, otherwise this pane stays unsure. It never shows
  another conversation.
- A contract test covers the uniqueness rule (a pane whose screen also
  matches this pane's thread claims nothing) and pruning (a closed pane's
  binding stops counting). Each part fails without its code.
- codexHistorySegments' doc comment is back above it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
devswha added a commit that referenced this pull request Sep 24, 2026
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.

2 participants