Understanding Sessions
A session is a single Pi conversation bound to a workspace (directory). Each session:- Has its own conversation history stored as a JSONL file
- Can run independently and concurrently with other sessions
- Can be named for easy identification
- Maintains its own context and tool execution state
Creating Sessions
Create a named session
Use the Sessions are automatically created for the current workspace when you run
duck new command with an optional name:duck without an existing session.Switching Between Sessions
The active voice session determines where your voice commands are sent. Switch sessions using:Following Multiple Sessions
You can monitor multiple sessions simultaneously by opening separate terminal windows.Open multiple terminals
Launch separate terminal windows or tabs for each session you want to monitor.
Follow different sessions
In Terminal A:In Terminal B:Each terminal will stream events only for its subscribed session.
Session States
Sessions can be in one of these states:- Running: The Pi subprocess is active and can accept commands
- Stopped: No active Pi process, but conversation history is preserved
- Active (voice): This session receives voice commands (only one at a time)
Example Workflow
Here’s a common multi-session workflow:Work with voice
Option+D and speak: “Find the authentication error in the logs”The bug-fix terminal shows the live stream.Session Storage
All session files are stored in:Advanced: Using Global Pi Sessions
Advanced: Using Global Pi Sessions
By default, Rubber Duck uses a dedicated session directory to avoid interfering with your existing Pi workflows.If you want to share sessions between Rubber Duck and Pi’s normal CLI, you can enable “Use global Pi sessions” in the advanced settings. This uses Pi’s standard session location instead.Note: This is an advanced feature and may cause session conflicts if you’re using Pi separately.
Best Practices
- Name your sessions descriptively so you can easily identify them later
- Use separate terminals to monitor long-running sessions
- Close unused sessions to free resources (sessions auto-stop when idle)
- Check session status with
duck sessionsbefore starting new work