Skip to content

feat(remote-sender): forward messageID and drop queued prompts - #13496

Merged
iscekic merged 1 commit into
mainfrom
agent-composers-c07a
Aug 28, 2026
Merged

feat(remote-sender): forward messageID and drop queued prompts#13496
iscekic merged 1 commit into
mainfrom
agent-composers-c07a

Conversation

@iscekic

@iscekic iscekic commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator
  • In a connected remote session, you can remove one waiting prompt while the active prompt continues. Other waiting prompts stay in the queue.

Implementation

The new drop_queued_message command uses DropQueuedMessageData to require a msg-prefixed messageID and validates sessionId before targeting one queued prompt. KiloSessionPromptQueue.drop emits session.queue.changed; success returns {}, while unknown or active messages return an error without stopping the active prompt. send_message retains optional messageID forwarding; new comments document the command-line interface (CLI) fallback for older clients that omit it.

Files
  • packages/opencode/src/kilo-sessions/remote-sender.ts — Source; modified (M), 34 changed lines: adds validated queued-message removal and documents the existing message identity fallback.

Tests: 1 test file modified — packages/opencode/test/kilocode/sessions/remote-sender.test.ts (M; 175 changed lines).
Generated: 0 files changed.


Issue

No separate issue was supplied; this pull request accompanies the Cloud Agent contract implementation.

Context

This pull request supplies the Kilo CLI handler for targeted cancellation from Cloud Agent clients.

  • Paired Cloud Agent contract: feat(agent-composer): add message identity and queue cancel APIs cloud#5537.
  • Kilo-Org/kilocode worktree: /Users/igor/Projects/.worktrees/agent-composers-c07a-kilocode; branch agent-composers-c07a, base origin/main, immutable head b9537ae089.
  • Kilo-Org/cloud worktree: /Users/igor/Projects/.worktrees/agent-composers-c07a; branch agent-composers-c07a-s6, cloud reference only.
  • Scope: 2 modified Kilo CLI files, 207 added lines, and 2 removed lines. This description includes no cloud changes.

Screenshots / Video

Visual Changes: N/A

How to Test

Verification

E2E report: none attached; the cumulative report belongs to cloud tip PR 5617.

Manual/local verification

The handoff supplies these results:

  • Current-head CI and Kilobot approve this PR.
  • Remote session relay verification passed; deterministic queued-message cancellation has automated coverage but no live verification.

This agent did not run product checks. The handoff does not identify whether an agent or a human ran the runtime checks.

Reviewer test steps

Run the remote-sender unit tests in the opencode package. The added cases cover dropping a waiting prompt, leaving an active run untouched, and messageID pass-through.

Run bun test ./test/kilocode/sessions/remote-sender.test.ts from packages/opencode/.

  1. Connect the updated Kilo CLI to the paired Cloud Agent implementation.
  2. Keep one prompt active while queuing two more prompts.
  3. Remove one waiting prompt through the remote connection.
  4. Confirm that the active prompt continues, the removed prompt never runs, and the other waiting prompt remains.
  5. Request removal of an unknown or active prompt.
  6. Confirm that the request returns an error without stopping the active prompt.

Blocked checks and substitute verification

The handoff names no blocked command. Automated coverage substitutes for live verification of deterministic queued-message cancellation.

Human steps

  • before merge — Complete the required review.
  • before merge — Verify deterministic queued-message cancellation with the paired Cloud Agent changes.
  • after merge — Update remote hosts to a Kilo CLI release with drop_queued_message before clients use it.

No new environment value, secret, migration, or flag change is required.

Checklist

  • Issue linked above, or exception explained
  • Tests/verification described
  • Screenshots/video included for visual changes, or marked N/A
  • Changeset considered for user-facing changes
  • I personally reviewed the diff and can explain the changes, including any AI-assisted work.

Get in Touch

No Discord handle provided.

Notes

Cumulative runtime verification and its limits are recorded in Kilo-Org/cloud#5617.

@iscekic iscekic self-assigned this Aug 27, 2026
@kilo-code-bot

kilo-code-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • packages/opencode/src/kilo-sessions/remote-sender.ts
  • packages/opencode/test/kilocode/sessions/remote-sender.test.ts

Reviewed by grok-4.6 · Input: 311.2K · Output: 19.1K · Cached: 801.4K

Review guidance: REVIEW.md from base branch main

@iscekic
iscekic merged commit c3deca6 into main Aug 28, 2026
31 checks passed
@iscekic
iscekic deleted the agent-composers-c07a branch August 28, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

human-ready PR is ready for a human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants