feat(agent): Maple-owned mid-run message queue - #781
Merged
Conversation
Allow Maple Agent users to send while a Desktop run is active. Mid-run messages attach to Goose's public steer queue and appear at the next convenient turn instead of requiring Stop first. ACP still rejects a second prompt.
Deploying maple with
|
| Latest commit: |
34a1fdd
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://aa0fc8de.maple-ca8.pages.dev |
| Branch Preview URL: | https://codex-agt-queue-maple.maple-ca8.pages.dev |
Stop now cancels an in-flight composer send even when a run is active, and Send stays locked until that cancelled run settles so a follow-up cannot hit the leftover Goose claim.
Mid-run Desktop follow-ups now live in a Maple FIFO and only become timeline turns when sequential Agent::reply promotes them. Composer chips support cancel and unqueue-for-edit. Stop cancels only the live Goose turn and leaves leftover chips; a later Send flushes the queue plus any composer draft. ACP still rejects a second prompt.
Keep empty Desktop queue entries so revision stays monotonic and later chips are not dropped. Peek the launch item and consume it only after the run is inserted, so claim/setup/insert failures leave leftovers. Promote under session_lifecycle, gate empty Send while a run is active, and fence pencil restore to the owning session. Apply ACP turn outcomes and Error events for every routing; only Desktop takes the next chip.
Desktop now promotes the entire leftover chip stack as consecutive individual user messages on the next convenient turn, instead of only the oldest item. Goose still merges consecutive same-role messages before the provider request, so Completions sees one user turn while the timeline keeps each chip as its own row.
Pencil no longer pops a chip and restacks it. The composer tracks the queue id being edited, Discard restores any unpublished draft, and Send updates that item's text while keeping its original position.
An open pencil edit now locks native promotion so a finishing turn cannot send the unedited chip. Save or Discard releases the lock. If the run already ended, Send saves the edit and flushes leftover chips in the same gesture.
Keep the Maple-owned staged queue and in-place chip edit while taking prompt-history navigation and composer-focus restoration from master.
AnthonyRonning
marked this pull request as ready for review
August 18, 2026 23:12
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
Maple Agent can send while a Desktop run is active. Follow-ups stay as staged chips on a Maple-owned FIFO and are promoted as consecutive individual user messages on the next convenient turn.
Follow-up for optional mid-loop steer: #792