Skip to content

Queueing and Nudging

When Cosine is already working, you can still add follow-up messages without interrupting the current run. The CLI supports two different behaviors:

  • Nudge: ask the current run to pick up an extra message as soon as it gets a chance
  • Queue: save a message for later so it starts only after the current run fully finishes

Use a nudge when you want to add a quick correction or extra instruction to the run that is already in progress.

Use a queue when you want Cosine to finish what it is currently doing first, then start a fresh follow-up turn afterward.

ShortcutAction
EnterSend a normal message
Enter while Cosine is runningAdd a nudge to the current run
Ctrl+Q while Cosine is runningAdd a queued follow-up message
Shift+EnterInsert a newline without sending
Ctrl+JInsert a newline without sending
Select the nearest stacked queued or nudged item above the input

While Cosine is running, the input area also shows an inline reminder on the right side:

ctrl+q to Queue / enter to Nudge

While Cosine is busy, stacked follow-ups appear above the input box:

[Queue #2] Review the tests after the refactor
[Queue #1] Add docs once the implementation is done

Queued items stack upward so your input stays at the bottom of the screen.

If you use a nudge instead, the stack uses Nudge labels:

[Nudge #2] Also handle empty input
[Nudge #1] Rename that helper for clarity
  1. Start a task and let Cosine begin working.
  2. Type a follow-up message.
  3. Press Enter.

Cosine keeps running the current task, then picks up that extra message at the next available opportunity inside the same active run.

This is useful for:

  • correcting a detail
  • adding a missing edge case
  • asking for one more check without waiting for the run to end
  1. Start a task and let Cosine begin working.
  2. Type a follow-up message.
  3. Press Ctrl+Q.

That message is stored as a queued follow-up. It does not jump into the current run.

Instead:

  1. Cosine finishes the run that is already in progress
  2. the first queued item starts as a new turn
  3. if more queued items remain, they run one at a time after each completed turn

This is useful when you want a sequence of follow-up tasks rather than one large interrupted run.

You can edit either a queued item or a nudged item before it runs.

  1. Press from the input box to select the nearest stacked item.
  2. Press Enter to move that item back into the input box.
  3. Edit the text.
  4. Press Enter or Ctrl+Q to submit it again.

When you resubmit an edited item, Cosine keeps its original behavior:

  • an edited nudge stays a nudge
  • an edited queued item stays queued
1. Ask Cosine to refactor a module
2. While it is running, type: "Also keep the public API unchanged"
3. Press Enter

That follow-up is treated as a nudge.

1. Ask Cosine to implement the main feature
2. While it is running, type: "Add tests for the new behavior" and press Ctrl+Q
3. Type: "Update the docs for this change" and press Ctrl+Q

Cosine will:

  1. finish the current implementation run
  2. run the tests follow-up
  3. then run the docs follow-up
  • Use nudge for small in-flight corrections.
  • Use queue for clearly separate next steps.
  • If the stack gets long, use to select and review items before they run.
  • If you are not sure which behavior you want, start with a nudge. If it should really wait until later, use a queue instead.
  • Navigation - Keyboard shortcuts and movement between sections
  • Modes - Understand how different CLI modes affect execution
  • Overview - General documentation for this section