Skip to content

Ability to run agent for a given task in detached mode #65

@nezhar

Description

@nezhar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions