Before You Start
Make sure the daemon is running with the web dashboard enabled:
codepiper daemon --webYou should see:
✓ Daemon started on /tmp/codepiper.sock✓ Web dashboard at http://127.0.0.1:3000If this is your first time, complete the onboarding flow first.
Creating a Session
From the CLI
The simplest way to create a session:
codepiper start -p claude-code -d ~/projects/my-appYou’ll get a session ID back:
✓ Session a1b2c3d4 started (claude-code)From the Web Dashboard
- Open
http://localhost:3000 - Navigate to Sessions in the sidebar
- Click Create Session
- Fill in the form:
- Provider: Claude Code or Codex
- Working directory: Absolute path to your project
- Billing mode: Subscription (default) or API
- Click Create
The session appears in the list and starts immediately.
Session Options
You can customize sessions with additional flags:
# Use API billing (pay-per-token, needed for automated workflows)codepiper start -p claude-code -d ~/project --billing api
# Create a git worktree for isolated workcodepiper start -p claude-code -d ~/project --worktree --create-branch feature/refactor
# Attach encrypted environment variablescodepiper start -p claude-code -d ~/project --env-set my-api-keys
# Pass arguments directly to the providercodepiper start -p claude-code -d ~/project -- --model opusSee Sessions & Providers for the full options reference.
Interacting with Your Session
Once a session is running, you have several ways to interact with it.
Web Terminal
Click on the session in the dashboard to open the session detail view. The Terminal tab shows a live terminal feed powered by xterm.js. You can:
- Type directly into the terminal
- Paste or drag-and-drop images for visual context
- Watch the agent’s output in real time
- Switch between the Tmux, Conversation, and Attach sub-views
The terminal polls tmux output and syncs cursor position, so what you see matches the actual session state.
CLI Attach
Jump into the session’s terminal from any shell:
codepiper attach a1b2c3d4This gives you a live, interactive connection. Keyboard input is forwarded directly to the tmux session. Press Ctrl+B D to detach without stopping the session.
For read-only monitoring:
codepiper attach a1b2c3d4 --followSend Text
Send a prompt without attaching:
codepiper send a1b2c3d4 "refactor the auth module to use Argon2"By default, a newline is appended (like pressing Enter). To send partial text:
codepiper send a1b2c3d4 --no-newline "partial input"Send Key Sequences
For interactive control:
codepiper keys a1b2c3d4 ctrl+c # Cancel current operationcodepiper keys a1b2c3d4 enter # Press Entercodepiper keys a1b2c3d4 escape up up enter # Navigate a menuSend Images
Provide visual context alongside a prompt:
codepiper send a1b2c3d4 --image screenshot.png "what's wrong with this layout?"Observing Your Session
Tail Output
Stream raw terminal output:
codepiper tail a1b2c3d4 --followView Events
Watch hook events and system events:
codepiper logs a1b2c3d4 --follow --source hookCheck Status
List all sessions and their states:
codepiper sessionsManaging Sessions
Stop
Gracefully stop a session:
codepiper stop a1b2c3d4The agent receives a stop signal and the tmux session is preserved. You can resume later.
Kill
Force-kill a stuck session:
codepiper kill a1b2c3d4This terminates the tmux session immediately.
Resume
Resume a stopped session (via the web dashboard or API). The daemon re-attaches to the existing tmux session and restarts event ingestion.
Model Switching (Claude Code)
Check or change the model mid-session:
codepiper model a1b2c3d4 # Show current modelcodepiper model a1b2c3d4 opus # Switch to Opuscodepiper model a1b2c3d4 sonnet # Switch to Sonnetcodepiper model a1b2c3d4 haiku # Switch to HaikuSession Persistence
Sessions survive everything:
- Daemon restarts. The daemon re-adopts orphaned tmux sessions on startup
- SSH disconnects. tmux sessions are detached, not killed
- Laptop lid close. If the daemon is on a server, sessions keep running
- Client disconnects. Sessions are daemon-owned, not client-owned
Stop your laptop, reboot, restart the daemon. Your sessions are still there.
Git Integration
Each session has a built-in git tab in the web dashboard showing:
- Status: Modified, staged, and untracked files
- Branches: All local branches
- Log: Commit history
- Diff: File-level diffs with syntax highlighting
- Stage/Unstage: Add or remove files from the index
All git operations run in the session’s working directory (or worktree, if you used --worktree).
What’s next
- Web Dashboard: Full dashboard walkthrough
- Permission Policies: Control what your agents can do
- Architecture: How the pieces fit together