contox daemon
Manage the background daemon for automatic session capture. The daemon runs in the background and captures session data automatically, reducing the need for manual saves.
Usage
bash
contox daemon <subcommand>
Subcommands
| Subcommand | Description |
|---|---|
start | Start the background daemon |
stop | Stop the running daemon |
status | Check if the daemon is running and show its status |
flush | Flush any captured data to the Contox platform |
Examples
Start the daemon:
bash
contox daemon start
Check daemon status:
bash
contox daemon status
Flush captured data:
bash
contox daemon flush
Stop the daemon:
bash
contox daemon stop
Daemon files
The daemon stores its state in the .contox/ directory within your project:
| File | Description |
|---|---|
.contox/daemon.pid | Process ID of the running daemon |
.contox/daemon.port | Port the daemon is listening on |
.contox/daemon-stats.json | Statistics about captured data |
How it works
When running, the daemon:
- Monitors session activity in the background
- Captures evidence (code changes, transcripts) as they happen
- Buffers data locally in the
.contox/directory - Flushes captured data to the platform on demand or at regular intervals
Notes
- The daemon must be started from within a project directory that has been initialized with
contox init. - Use
contox daemon flushto manually trigger a data push if you want to ensure captured evidence is sent immediately. - The
contox approvecommand also flushes the daemon as part of its operation. - If the daemon crashes or is killed, you can safely restart it with
contox daemon start. Existing captured data will not be lost.