Skip to content

Deliver replyable orchestration messages to background PTYs#8057

Open
bbingz wants to merge 14 commits into
stablyai:mainfrom
bbingz:bbingz/fix-replyable-agent-review-routing
Open

Deliver replyable orchestration messages to background PTYs#8057
bbingz wants to merge 14 commits into
stablyai:mainfrom
bbingz:bbingz/fix-replyable-agent-review-routing

Conversation

@bbingz

@bbingz bbingz commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • route one-way handoffs, blocking reviews, and asynchronous conversations through their correct Orca transports
  • make orchestration ask and send/reply guidance override ambiguous handoff wording when a response must return
  • deliver pending messages to already-idle synthetic background PTYs and on working-to-idle transitions
  • preserve active-coordinator and Cursor Agent no-auto-submit behavior
  • prevent duplicate payload and Enter injection after a background PTY is adopted by a renderer leaf

Root cause

Reply persistence and threaded replies already worked, but push-on-idle resolved renderer leaf handles only. A live Grok smoke stored the decision gate without delivery; a manual inbox check and reply returned GROK_REPLY_OK, isolating the gap to automatic background-PTY injection.

Validation

  • affected Vitest suites: 720 passed
  • includes already-idle, queued working-to-idle, Cursor safety, and adopted-handle exactly-once regressions
  • oxfmt --check
  • oxlint
  • pnpm typecheck:node
  • pnpm check:max-lines-ratchet
  • git diff --check

Scope

No new CLI verb, RPC protocol, UI, Grok-specific runtime branch, or stale restart-status inference is introduced.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds routing guidance and tests that select terminal send, orchestration ask, or orchestration send/reply according to the required return path. Documents timeout, handle, and group-address constraints. Extends runtime pending-message delivery to synthetic background PTYs, including idle-transition delivery, Cursor Agent no-auto-submit behavior, and deduplication when a PTY is adopted by a renderer leaf.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers summary, root cause, validation, and scope, but it omits required Screenshots, AI Review Report, Security Audit, and Notes sections. Add the missing template sections, including screenshots/no visual change, AI review report with cross-platform checks, security audit, and notes.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately summarizes the main change: routing replyable orchestration messages to background PTYs.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e2227787-aa5e-4d19-a772-5c0fba6f46ae

📥 Commits

Reviewing files that changed from the base of the PR and between 3f9dbba and e65630f.

📒 Files selected for processing (8)
  • config/scripts/orca-cli-skill-guidance.test.mjs
  • config/scripts/orchestration-skill-guidance.test.mjs
  • docs/reference/2026-07-10-replyable-agent-review-routing-design.md
  • docs/reference/2026-07-10-replyable-agent-review-routing-implementation-plan.md
  • skills/orca-cli/SKILL.md
  • skills/orchestration/SKILL.md
  • src/main/runtime/orca-runtime.test.ts
  • src/main/runtime/orca-runtime.ts

Comment thread config/scripts/orca-cli-skill-guidance.test.mjs
Comment thread config/scripts/orchestration-skill-guidance.test.mjs
@bbingz
bbingz force-pushed the bbingz/fix-replyable-agent-review-routing branch from a324bc9 to b8c57ce Compare July 10, 2026 10:05

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: be45841f-0f7f-4035-9f2c-cee72a1c0ff0

📥 Commits

Reviewing files that changed from the base of the PR and between a324bc9 and b8c57ce.

📒 Files selected for processing (8)
  • config/scripts/orca-cli-skill-guidance.test.mjs
  • config/scripts/orchestration-skill-guidance.test.mjs
  • docs/reference/2026-07-10-replyable-agent-review-routing-design.md
  • docs/reference/2026-07-10-replyable-agent-review-routing-implementation-plan.md
  • skills/orca-cli/SKILL.md
  • skills/orchestration/SKILL.md
  • src/main/runtime/orca-runtime.test.ts
  • src/main/runtime/orca-runtime.ts
✅ Files skipped from review due to trivial changes (3)
  • docs/reference/2026-07-10-replyable-agent-review-routing-implementation-plan.md
  • docs/reference/2026-07-10-replyable-agent-review-routing-design.md
  • skills/orchestration/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (4)
  • config/scripts/orca-cli-skill-guidance.test.mjs
  • config/scripts/orchestration-skill-guidance.test.mjs
  • src/main/runtime/orca-runtime.test.ts
  • src/main/runtime/orca-runtime.ts

Comment thread skills/orca-cli/SKILL.md Outdated
@AmethystLiang
AmethystLiang requested a review from Jinwoo-H July 10, 2026 16:47
@bbingz
bbingz force-pushed the bbingz/fix-replyable-agent-review-routing branch 2 times, most recently from 9f4b28b to 2147e6b Compare July 12, 2026 00:31
@bbingz
bbingz force-pushed the bbingz/fix-replyable-agent-review-routing branch from 2147e6b to 3e193a3 Compare July 12, 2026 10:06
@bbingz

bbingz commented Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto latest origin/main. Resolved skill/docs conflicts by keeping main agent-first + full worktree-id guidance (OMP/Pi/Grok, startupTerminal.handle) and PR replyable review routing (orchestration ask/send/reply contract).

@bbingz

bbingz commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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