You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/agents/index.md
+51-8Lines changed: 51 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,7 +153,24 @@ agents:
153
153
MY_VAR: value
154
154
```
155
155
156
-
## Passing arguments to the agent
156
+
## Running one prompt
157
+
158
+
Use `--prompt` to run a single task in the selected agent's non-interactive mode:
159
+
160
+
```bash
161
+
vp run codex --prompt "Write TEST.md"
162
+
vp run claude --prompt "Summarize this repository"
163
+
```
164
+
165
+
Combine it with detached mode to run the same non-interactive task in the background:
166
+
167
+
```bash
168
+
vp run codex --detached --prompt "Write TEST.md"
169
+
```
170
+
171
+
VibePod maps `--prompt` to each agent's documented prompt mode (`claude -p`, `codex exec`, `opencode run`, and so on).
172
+
173
+
## Passing raw arguments to the agent
157
174
158
175
Any extra arguments after the agent name are appended to the agent command inside the container:
159
176
@@ -206,21 +223,36 @@ vp run codex --ikwid
206
223
207
224
## Detached mode
208
225
209
-
Use `-d` / `--detach`to start an agent container in the background without attaching your terminal. The agent process starts immediately inside the container — `-d` only controls whether VibePod attaches your terminal to it.
226
+
Use `-d`, `--detach`, or `--detached` to start an agent container in the background without attaching your terminal. The agent process starts immediately inside the container and VibePod returns a task ID that can be used to retrieve logs later.
210
227
211
228
### Basic usage
212
229
213
230
```bash
214
-
vp run claude -d
215
-
# ✓ Started vibepod-claude-a1b2c3d4
231
+
vp run codex --detached --prompt "Write TEST.md"
232
+
# ✓ Started vibepod-codex-a1b2c3d4
233
+
# ✓ Task ID: 9f2c7d4e8a1b4c6f9a0d2e3f4b5c6d7e
216
234
```
217
235
218
-
The command prints the container name and returns immediately. You can also find it later with:
236
+
The command prints the container name and task ID, then returns immediately. You can also find running task IDs later with:
219
237
220
238
```bash
221
239
vp list --running
222
240
```
223
241
242
+
### Retrieving detached output
243
+
244
+
Detached container output is collected in the local VibePod logs database while the task runs.
245
+
246
+
```bash
247
+
vp logs show 9f2c7d4e8a1b4c6f9a0d2e3f4b5c6d7e
248
+
```
249
+
250
+
For a still-running task, you can attach by task ID:
251
+
252
+
```bash
253
+
vp logs attach 9f2c7d4e8a1b4c6f9a0d2e3f4b5c6d7e
254
+
```
255
+
224
256
### Interacting with a detached container
225
257
226
258
The agent is already running inside the container. You can exec into it to inspect state, install extra tools, or interact with the agent alongside its running process:
- **`auto_remove` (default: `true`)** — By default, containers are automatically removed when they stop. This means you cannot restart a stopped detached container; you need to `vp run` again. Set `auto_remove: false` in your [configuration](../configuration.md) if you want stopped containers to persist.
258
-
- **No built-in re-attach** — VibePod does not currently have a command to re-attach your terminal to a detached container. Use `docker attach <container>` or `docker exec -it <container> bash` directly.
259
-
- **Session logging** — Sessions started with `--detach` are not recorded in the VibePod session log since VibePod does not capture the interactive I/O. If you need session logging, run without `--detach`.
289
+
- **`auto_remove` (default: `true`)** — Foreground containers are automatically removed when they stop by default. Detached containers are kept so their Docker logs remain available through the task ID.
290
+
- **Session logging disabled** — If `logging.enabled` is `false`, VibePod still starts the detached container and prints a task ID, but it does not collect detached output in SQLite.
260
291
261
292
## Connecting to a Docker Compose network
262
293
@@ -464,3 +495,15 @@ vp run copilot # or: vp p
464
495
```bash
465
496
vp run codex # or: vp x
466
497
```
498
+
499
+
For non-interactive detached tasks, use Codex's `exec` subcommand:
500
+
501
+
```bash
502
+
vp run codex --detached -- exec "Write a TEST.md file with details to our test strategy"
503
+
```
504
+
505
+
For unattended edits, combine it with IKWID mode:
506
+
507
+
```bash
508
+
vp run codex --detached --ikwid -- exec "Write a TEST.md file with details to our test strategy"
0 commit comments