Skip to content

Add initial version of task mode#71

Open
nezhar wants to merge 1 commit into
mainfrom
task-mode
Open

Add initial version of task mode#71
nezhar wants to merge 1 commit into
mainfrom
task-mode

Conversation

@nezhar
Copy link
Copy Markdown
Collaborator

@nezhar nezhar commented May 14, 2026

Introduces a new "task mode" (headless/background execution) for agents in VibePod, adds the vp task CLI command group, and refactors container launch logic for better code reuse. It also updates agent specifications to support headless operation and improves documentation for these features.

The most important changes are:

New Features: Task Mode and CLI Integration

  • Added a new "task mode" that allows agents to be run non-interactively as background tasks, including a new vp task command with subcommands for running, managing, and inspecting tasks.
  • Registered the new task command group in the main CLI (src/vibepod/cli.py) to make task operations available to users. [1] [2]

Agent Specification and Headless Support

  • Extended the AgentSpec class and agent definitions to include a headless_prefix, enabling correct invocation of agents in headless mode (e.g., claude -p, codex exec, auggie --print). [1] [2] [3] [4]

Codebase Refactoring and Reuse

  • Moved container launch helper functions from run.py into a new shared module core/launch.py, improving maintainability and reducing duplication between interactive and task-based agent execution. [1] [2]

Documentation

  • Updated the documentation (docs/agents/index.md) to explain task mode, supported agents, CLI usage, environment variable handling, and caveats for users.

These changes collectively enable robust, scriptable, and automatable agent execution in VibePod.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

Warning

Rate limit exceeded

@nezhar has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 58 minutes and 9 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 31aaa879-0232-44cb-93bc-543fbef37684

📥 Commits

Reviewing files that changed from the base of the PR and between 60c9429 and 9058268.

📒 Files selected for processing (9)
  • docs/agents/index.md
  • src/vibepod/cli.py
  • src/vibepod/commands/run.py
  • src/vibepod/commands/task.py
  • src/vibepod/core/agents.py
  • src/vibepod/core/launch.py
  • src/vibepod/core/tasks.py
  • tests/test_task_cmd.py
  • tests/test_tasks.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch task-mode

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented May 14, 2026

🤖 Augment PR Summary

Summary: This PR introduces an initial “task mode” for running supported agents headlessly in detached Docker containers, with a new vp task command group and a small launch refactor to share helpers.

Changes:

  • Added vp task CLI group with run/list/logs/status/rm commands, persisting task metadata in a local SQLite registry.
  • Extended AgentSpec with headless_prefix and set it for Claude/Codex/Auggie to enable non-interactive invocations.
  • Refactored common container-launch helpers into src/vibepod/core/launch.py and updated vp run to use them.
  • Implemented a new TaskStore (tasks.db) + record model for task lookup and prefix-based ids.
  • Added test coverage for the new task command behavior and the task store.

Technical Notes: Task containers are started with auto_remove=False so logs/exit status remain available; proxy + agent env wiring mirrors vp run, and docs were updated to describe task mode usage and caveats.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 5 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread docs/agents/index.md
# follow: vp task logs 9f1e8a20b4c1 --follow
```

The command starts a detached container, writes a row to `~/.config/vibepod/tasks.db`, and returns a task id. The container is **not** auto-removed, so you can inspect logs and exit status after it finishes.
Copy link
Copy Markdown

@augmentcode augmentcode Bot May 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs/agents/index.md:274 The doc hard-codes the task DB location as ~/.config/vibepod/tasks.db, but the code uses platformdirs.user_config_dir() so the actual path differs on macOS/Windows.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

network=network_name,
)

if proxy_ca_path:
Copy link
Copy Markdown

@augmentcode augmentcode Bot May 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/vibepod/commands/task.py:278 If proxy.ca_path is configured but the cert file doesn’t appear within the 10s loop, task mode proceeds silently; this can lead to confusing TLS failures later. Consider emitting a warning (similar to vp run) when the CA still isn’t present after the deadline.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

)

container.reload()
if container.status not in {"running", "created"}:
Copy link
Copy Markdown

@augmentcode augmentcode Bot May 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/vibepod/commands/task.py:319 Treating container status created as a success case may record a task whose container never actually started (since created typically means “not running yet”). This could make vp task list/status report tasks that can’t ever produce logs or exit codes.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

) -> None:
"""List recent tasks with container status."""
store = _task_store()
filter_agent = resolve_agent_name(agent) if agent else None
Copy link
Copy Markdown

@augmentcode augmentcode Bot May 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/vibepod/commands/task.py:366 When --agent is provided but doesn’t resolve (typo/unknown), filter_agent becomes None and the command lists all tasks rather than erroring or returning no rows, which is surprising for a filter flag.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Comment thread src/vibepod/core/tasks.py
return []
with self._connect() as conn:
rows = conn.execute(
"SELECT * FROM tasks WHERE id LIKE ? ORDER BY created_at DESC",
Copy link
Copy Markdown

@augmentcode augmentcode Bot May 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/vibepod/core/tasks.py:140 find_by_prefix() uses LIKE without escaping, so wildcard characters in prefix (e.g. %/_) can match unintended task ids and make prefix resolution behave unexpectedly.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant