How Sessions Work
Every time you run a qckfx command, the CLI:- Saves the conversation after successful execution
- Stores session data in a platform-specific directory
- Organizes by working directory so each project has its own session history
- Tracks metadata like timestamps and git commit information
Continuing Sessions
Use the--continue
(or -c
) flag to resume your most recent conversation:
Sessions are tied to your current working directory. If you change directories,
--continue
will look for the most recent session in that new directory.Session Storage
Sessions are stored in platform-specific locations:- macOS
- Linux
- Windows
Directory Structure
Sessions are organized by working directory:Session Data Format
Each session file contains:Session Metadata
Field | Description |
---|---|
createdAt | ISO timestamp when session was created |
cwd | Absolute path of working directory |
gitCommit | Short git commit SHA (if in a git repository) |
messages | Array of conversation messages |
Session Behavior
Automatic Session Creation
Sessions are created automatically:Per-Directory Isolation
Each working directory maintains its own session history:Session Recovery
If session loading fails, the CLI gracefully falls back:- Session file is corrupted
- Message format has changed between versions
- File permissions prevent reading
Working with Sessions
Check Session Status
There’s no built-in command to view session history, but you can inspect the files directly:Clear Sessions
To start fresh, you can remove session files:Removing session files is permanent. There’s no way to recover deleted conversation history.
Best Practices
1. Use Descriptive Initial Prompts
Since sessions maintain context, start with clear context:2. Continue Related Work
Use--continue
for related tasks in the same project:
3. Start Fresh for New Topics
Don’t continue sessions when switching to unrelated topics:4. Leverage Directory Isolation
Organize your work by using different directories for different projects:Troubleshooting
Session Not Found
- First time running qckfx in this directory
- Session files were deleted
- Working in a different directory than before
Session Loading Failed
- Corrupted session file
- Version incompatibility
- File permission issues
Permission Errors
If you see permission errors when saving sessions, check:- Directory permissions for the session storage location
- Disk space availability
- File system read/write permissions
Session Limitations
- No cross-directory sharing: Sessions are isolated per working directory
- No manual session management: You can’t manually switch between multiple sessions in the same directory
- No session naming: Sessions are identified by timestamp only
- No session export/import: Sessions are stored in internal format only
Related Topics
- qckfx Command - Using the
--continue
flag - Context Window - Understanding conversation context
- Agent Configuration - Configuring agent behavior