fix(FN-827): fix orphaned pause path so gracefully-paused tasks return to todo

- Fix executor bug where tasks paused during execution with a graceful session exit were silently dropped instead of moved back to todo
- When session.dispose() resolves the prompt without throwing, the paused-aborted flag now triggers moveTask(todo) so the scheduler can resume after unpause
- Add executor test suite covering pause via graceful exit, pause via abort error, and pause during session disposal
- Document corrected pause/unpause behavior for in-progress tasks in README and AGENTS.md
This commit is contained in:
gsxdsm
2026-04-03 22:09:56 -07:00
parent 004a282074
commit 6a192d009c
5 changed files with 114 additions and 2 deletions

View File

@@ -750,6 +750,10 @@ Automatically resolves:
```
Terminates and retries tasks with no agent activity for the specified duration (10 minutes in this example).
**Pause Behavior for In-Progress Tasks:**
Pausing a task that is currently executing will immediately terminate the agent session and move the task back to `todo`. When the task is later unpaused, the scheduler picks it up and resumes execution from where it left off (step progress is preserved). The task is never left stranded in `in-progress` after a pause — both the error-throwing and graceful session exit paths move it to `todo`. Paused tasks are never marked as `failed`.
**Push Notifications (ntfy.sh):**
```json
{