Skip to content

Keep Claude runs open until a mid-text steer gets its own reply - #1614

Merged
currentbits merged 7 commits into
mainfrom
coder/claude-reply-to-a-mid-text-steer-is-drop-c83ba9
Oct 13, 2026
Merged

currentbits merged 7 commits into
mainfrom
coder/claude-reply-to-a-mid-text-steer-is-drop-c83ba9

Conversation

@currentbits

Copy link
Copy Markdown
Owner

When a steer lands while Claude is mid-text, Claude CLI 2.1.283 doesn't fold it into the current turn. It answers in a second turn after the first result. The runner ended the run on that first result, so the reply to the steer was dropped (#1608).

What changed

  • electron/providers.js: the Claude CLI is now launched with --replay-user-messages. The CLI then echoes each stdin user line (type: "user", isReplay: true) when it takes the line up. That happens either at a tool boundary before the result, or as the start of its own turn after it.
  • electron/runner.js: steerRun saves the steer text it sent on the live entry in unansweredSteers. That list only exists for Claude runs.
  • electron/runner-provider-claude.js:
    • Each run entry gets a new unansweredSteers list.
    • When a replay echo arrives, every steer contained in it is removed from the list. It uses includes() because steers sent together come back as one echo joined with "\n".
    • If a result arrives while a steer is still unanswered, the run stays open. It still records that turn's session id and usage, saves the store, pushes detail, and returns without finalising. The next result closes the run as usual.
    • If the CLI exits before it echoes the steer, the existing onExit path fails the run. The thread can't get stuck on "working".

Tests

  • claude.test.js:
    • The fake CLI's steer-wait scenario now emits the replay echo.
    • A new steer-no-echo scenario covers a CLI that never takes the steer up. The new test checks that the run ends failed and is no longer running.
    • The argv test now checks for --replay-user-messages.
  • Replay fixture claude-2.1.283-steer.ndjson: adds the recorded isReplay echo of the steer.
  • replay-scenarios.test.js: the todo: "#1608" test is now a real test. It asserts:
    • there are two assistant replies, the original text and then "steered", both with the same runId;
    • usage counts 2 turns and a cost of 0.0326415, because total_cost_usd is the process's running total.

🤖 Generated with Claude Code

Willem and others added 6 commits October 12, 2026 12:06
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T20:19:18.298504Z 02e45fc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 02e45fca29

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread electron/orchServer.js
: {}),
trigger: hasTrigger ? { type: "github", ...triggerRaw } : null,
tier: args && args.tier,
...(args && args.memory != null ? { memory: args.memory } : {}),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Expose memory in the automation_create schema

When an agent tries to create an automation with initial memory, this forwarding branch is unreachable through the MCP tool: the automation_create input schema around line 1711 declares model, preset, enabled, tier, and trigger, but not memory, so MCP/Zod validation strips or rejects that argument before this handler runs. Add an optional string memory field to the registered schema so the newly supported value can actually reach addAutomation.

Useful? React with 👍 / 👎.

…-a-mid-text-steer-is-drop-c83ba9

# Conflicts:
#	electron/test/fixtures/replay/claude-2.1.283-steer.ndjson
#	electron/test/replay-scenarios.test.js
@currentbits
currentbits merged commit 78703ad into main Oct 13, 2026
6 checks passed
currentbits pushed a commit that referenced this pull request Oct 13, 2026
…-0c31dd

Replay harness files take main's #1614 version. htmlFence takes main's
warm-import fix (#1615); threadView uses the same warm import instead of
polling.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
currentbits pushed a commit that referenced this pull request Oct 19, 2026
…-0c31dd

Replay harness files take main's #1614 version. htmlFence takes main's
warm-import fix (#1615); threadView uses the same warm import instead of
polling.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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