Skip to content

fix(agent): wait for prompt enter submission - #2461

Closed
charlieYong wants to merge 1 commit into
herdrdev:masterfrom
charlieYong:fix-agent-prompt-enter-submit
Closed

fix(agent): wait for prompt enter submission#2461
charlieYong wants to merge 1 commit into
herdrdev:masterfrom
charlieYong:fix-agent-prompt-enter-submit

Conversation

@charlieYong

Copy link
Copy Markdown

Summary

  • agent.prompt could return / --wait could resolve while prompt text still sat unsubmitted in the composer, because delayed Enter was scheduled separately and composer text alone could advance state_change_seq.
  • Prompt text and delayed Enter are now one ordered PTY submission: intervening input is deferred until Enter is written.
  • --wait sleeps through the Enter delay, then rebaselines effect observation on a post-Enter state_change_seq so pre-Enter screen updates cannot satisfy the effect gate. Callers without --wait still return immediately after enqueue.

refs #2422

Test plan

  • ordered_submission_* pane tests (interleave deferred; second hold rejected)
  • agent_prompt_sends_text_then_delays_enter and agent_prompt_orders_enter_before_intervening_input
  • prompt_wait_rebaseline_rejects_composer_only_seq_bump
  • cargo fmt --check + cargo clippy -D warnings
  • all herdr binary unit tests (3035)
  • full just ci in this environment: PTY-spawned integration tests (auto_detect_*, some session/client_mode/multi_client) also fail on clean master here; not caused by this patch

Made with Cursor

refs herdrdev#2422

Co-authored-by: Cursor <cursoragent@cursor.com>
@kangal-bot

Copy link
Copy Markdown
Collaborator

Hi @charlieYong, thanks for your interest in contributing.

Herdr does not accept unsolicited implementation pull requests from contributors who are not listed in .github/APPROVED_CONTRIBUTORS.

The pull request author is not an approved contributor.

If you encountered a reproducible bug, report the observed behavior through the bug issue template. A report does not reserve the work or authorize a pull request; accepted fixes are normally implemented by Herdr’s maintainer-controlled agents.

Feature requests, behavior changes, and other proposals belong in GitHub Discussions. Do not open an issue merely to justify an implementation that was already written.

If a maintainer explicitly wants this implementation, they can reopen the pull request. Reopening by anyone else will be closed again automatically.

See https://github.com/herdrdev/herdr/blob/master/CONTRIBUTING.md for the contribution policy.

@kangal-bot kangal-bot closed this Aug 7, 2026
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • ai-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 106f8686-9ea4-40da-9bb1-b8bbd487bc96

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

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