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
When to use each one
Section titled “When to use each one”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.
Keyboard shortcuts
Section titled “Keyboard shortcuts”| Shortcut | Action |
|---|---|
Enter | Send a normal message |
Enter while Cosine is running | Add a nudge to the current run |
Ctrl+Q while Cosine is running | Add a queued follow-up message |
Shift+Enter | Insert a newline without sending |
Ctrl+J | Insert 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 NudgeWhat you see in the interface
Section titled “What you see in the interface”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┃How nudges work
Section titled “How nudges work”- Start a task and let Cosine begin working.
- Type a follow-up message.
- 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
How queued messages work
Section titled “How queued messages work”- Start a task and let Cosine begin working.
- Type a follow-up message.
- Press
Ctrl+Q.
That message is stored as a queued follow-up. It does not jump into the current run.
Instead:
- Cosine finishes the run that is already in progress
- the first queued item starts as a new turn
- 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.
Editing stacked items
Section titled “Editing stacked items”You can edit either a queued item or a nudged item before it runs.
Edit the nearest stacked item
Section titled “Edit the nearest stacked item”- Press
↑from the input box to select the nearest stacked item. - Press
Enterto move that item back into the input box. - Edit the text.
- Press
EnterorCtrl+Qto 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
Example workflow
Section titled “Example workflow”Add a quick correction to the current run
Section titled “Add a quick correction to the current run”1. Ask Cosine to refactor a module2. While it is running, type: "Also keep the public API unchanged"3. Press EnterThat follow-up is treated as a nudge.
Line up multiple follow-up tasks
Section titled “Line up multiple follow-up tasks”1. Ask Cosine to implement the main feature2. While it is running, type: "Add tests for the new behavior" and press Ctrl+Q3. Type: "Update the docs for this change" and press Ctrl+QCosine will:
- finish the current implementation run
- run the tests follow-up
- 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.
See Also
Section titled “See Also”- Navigation - Keyboard shortcuts and movement between sections
- Modes - Understand how different CLI modes affect execution
- Overview - General documentation for this section