Cookbook

Patterns, scripts, and workflows for common setups.

Persistent sessions

Pick up where you left off. The agent keeps its full conversation history.

session.sh
# Start a session, save the ID
SESSION=$(vibespace multi --vibespaces backend \
"Build the auth module" --json | jq -r '.data.session_id')
# ... hours later, resume with full context
vibespace multi -r $SESSION "Now add rate limiting"
# Agent remembers the auth module it built

Batch processing

Feed a queue of tasks via JSONL. Agents work through them in order.

tasks.jsonl
{"agent": "claude-1", "message": "Fix the auth bug"}
{"agent": "claude-2", "message": "Add input validation"}
{"agent": "claude-1", "message": "Write tests for auth"}
{"agent": "claude-2", "message": "Update the docs"}
run.sh
# Process entire queue
cat tasks.jsonl | \
vibespace multi --batch \
--vibespaces backend

Mixed permission modes

Give one agent full access. Keep another locked down for review.

mixed-permissions.sh
vibespace create project -t claude-code
# claude-1: skip all permission prompts
vibespace config set claude-1 --skip-permissions --vibespace project
# Add a second agent that stays cautious
vibespace agent create --vibespace project
vibespace config set claude-2 --no-skip-permissions --vibespace project
# claude-1 builds fast, claude-2 reviews carefully

Pre-commit code review

Spin up an agent, review your staged changes, tear it down.

.git/hooks/pre-commit
#!/bin/bash
vibespace create review -t claude-code && \
vibespace exec --vibespace review -- \
"Review this diff for bugs: $(git diff --cached)" && \
vibespace delete review --force
# Blocks commit if agent finds issues

Continuous test watcher

Run tests in a loop. When they fail, an agent fixes them.

watch.sh
#!/bin/bash
vibespace create fixer -t claude-code
while true; do
npm test || \
vibespace multi --vibespaces fixer "fix the failing tests"
sleep 30
done

Mount external directories

Mount local directories into the agent container.

mount.sh
# Mount your monorepo into the vibespace
vibespace create backend -t claude-code \
--mount ~/code/monorepo:/workspace
# Agent sees your code at /workspace
vibespace connect --vibespace backend