Fix RunPane Claude prompt submission#351
Open
parsakhaz wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d797ab797a
ℹ️ 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".
Member
Author
Codex PR Test Automation QAStatus: Passed automated QA with live-daemon limit What passed
Daemon/live limits
No product code was changed. Nothing was merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #302.
This fixes the Claude direct-submit path in RunPane so
runpane panels submit --text ...no longer writes prompt text plus CR as one blind terminal write when the target panel is a Claude composer. Pane now writes the text payload first, waits briefly for composer state, submits through the same verified composer path used bypanels submit-composer --strategy auto, and reports whether submission was verified.It also wires the same verified submit behavior into Claude
panes create/panels createinitial-input delivery after--wait-ready, so orchestrators get explicitinitialInputstatus instead of treating a staged-but-idle prompt as started work.Visual Overview
Root Cause
The direct-submit and initial-input paths could leave Claude Code holding pasted text in its composer while RunPane reported success/readiness. The command-level result did not include a verification contract, so orchestrators could believe work had started even though Claude was idle with the prompt staged.
The existing
submit-composerpath already knew the per-agent submit sequence and could verify that the composer cleared. This PR routes Claude direct submit and Claude initial-input submit through that verified path instead of assuming a plain terminal Enter means the agent accepted the task.Verification Contract
panels submitnow returns submission verification fields for Claude panels:strategy: "enter"sequenceName: "enter-cr"verifiedSubmitted: booleanblockedwhen Pane detects an interactive prompt/update gatePane creation results now include:
initialInput.deliveredinitialInput.submittedinitialInput.verifiedSubmittedinitialInput.strategyinitialInput.sequenceNameinitialInput.nextCommandThe Node and Python wrappers now exit nonzero for unverified
panels submitresults and print blocked guidance when present.Tests
Passed under Node
v22.23.1:pnpm --filter main exec vitest run src/ipc/runpane.test.ts(44 tests)pnpm run test:runpane-contractpnpm typecheckpnpm lint(passes with existing warnings)CI / Environment Notes
The local default
node v26.4.0cannot install this repo today becausebetter-sqlite3-multiple-ciphers@12.6.2fails to compile against Node 26 V8 APIs. The supported repo runtime used for verification was Homebrew Node 22. Vitest also prints existingmain...HEADgit revision warnings during the focused IPC suite, but the suite completes successfully.Codex QA Summary
Status: Passed automated QA with live-daemon limit (2026-07-21 17:25 PDT). Marker:
qa-pr351-2026-07-21-pdt.Validated under Homebrew Node
v22.23.1:mainfromissue-302-striderv-investigateatd797ab797ad9db1439152e002ae47d3c0069e8b0; no review comments were present when tested.panels submituses separate verified composer Enter, Claude initial-input auto-submit still works, unverified Claude initial-input marks creation unsuccessful, Codex/non-Claude submit-composer and exact-byte paths remain covered by existing tests.panels submitkeep legacy success behavior, surfaceverifiedSubmitted, and return nonzero plus blocked/next-command guidance when verification fails.Limit: an isolated PR-code headless daemon with
PANE_DIR=/tmp/pane-pr351-qa.lqchVFdid not start becausebetter-sqlite3-multiple-cipherswas built for Node ABI127while Electron required ABI136. I did not run mutating live Claude-pane submissions against the installed daemon because it is Pane2.4.29on the real~/.pane, not isolated PR code.