Is your feature request related to a problem? Please describe.
When submitting a new instruction while a previous task is still running, the new instruction interrupts the ongoing task midway. The two tasks then run in an interleaved/mixed manner, which can lead to:
- Incomplete execution: The first task may never finish properly.
- Unpredictable behavior: Outputs from both tasks get mixed together.
- Data corruption: Shared state or files may be left in an inconsistent state.
Example scenario:
- User submits Task A (e.g., "Process all papers in collection X")
- Task A is 50% complete
- User submits Task B (e.g., "Export labels to JSON")
- Task A is interrupted, Task B starts
- Both tasks run interleaved, producing mixed/unexpected results
Describe the solution you'd like
Add a task queue mode option that ensures instructions are executed sequentially:
- Default mode (current behavior): New instructions can interrupt ongoing tasks (backward compatible).
- Queue mode (new option): When enabled, new instructions are queued and wait for the current task to complete before starting.
Suggested behavior when queue mode is enabled:
- Display: "Task already running. Your instruction has been queued."
- Execute tasks FIFO (First In, First Out)
- Show queue status: "X tasks in queue, currently executing: [task name]"
- Allow queue management: view queue, cancel queued tasks
Describe alternatives you've considered
None yet, wait for completion and then enter the next prompt.
Additional context
Is your feature request related to a problem? Please describe.
When submitting a new instruction while a previous task is still running, the new instruction interrupts the ongoing task midway. The two tasks then run in an interleaved/mixed manner, which can lead to:
Example scenario:
Describe the solution you'd like
Add a task queue mode option that ensures instructions are executed sequentially:
Suggested behavior when queue mode is enabled:
Describe alternatives you've considered
None yet, wait for completion and then enter the next prompt.
Additional context