Summary
Add support to run an agent for a given task in detached mode, where the process runs in the background, returns immediately with a task ID, and logs/results are stored locally.
Expected Behavior
- User can run an agent with a
--detach or --detached option.
- CLI returns immediately with a task/run ID.
- The agent execution continues in the background.
- All logs and results are stored in local SQLite DB and are associated with the task ID.
- CLI allows retrieving task results and logs by ID after completion, e.g., via
run logs <id> or run attach <id>.
Motivation
Some tasks may be long-running, and users may wish to start these asynchronously or in the background, rather than blocking their current session. Storing logs and results for retrieval improves workflow efficiency.
Acceptance Criteria
- Support for running agent tasks in detached/background mode.
- Task/run ID is returned to the user immediately upon starting.
- Results and logs are persisted and accessible via the CLI.
- Documentation and help text updated for detached mode usage.
Additional Context
- Ensure that running in detached mode does not conflict with existing synchronous task running or logging behavior.
Summary
Add support to run an agent for a given task in detached mode, where the process runs in the background, returns immediately with a task ID, and logs/results are stored locally.
Expected Behavior
--detachor--detachedoption.run logs <id>orrun attach <id>.Motivation
Some tasks may be long-running, and users may wish to start these asynchronously or in the background, rather than blocking their current session. Storing logs and results for retrieval improves workflow efficiency.
Acceptance Criteria
Additional Context