Skip to main content

Overview

hcom reset archives the current session and clears the database. Use this to start fresh while preserving history.

Usage

hcom reset              # Archive conversation, clear database
hcom reset hooks        # Remove hooks only
hcom reset all          # Nuclear option: stop all + clear + remove hooks + reset config

Standard Reset

hcom reset
What it does:
1

Stop all instances

Kills all local hcom-tracked instances and closes terminal panes.
2

Archive database

Copies hcom.db to ~/.hcom/archive/session-{timestamp}/.
3

Clear database

Deletes hcom.db, hcom.db-wal, hcom.db-shm.
4

Log reset event

Creates fresh database with reset event logged.
5

Sync relay

Pushes reset event to remote devices (if relay enabled).
Output:
Archived to ~/.hcom/archive/session-2026-03-04_143022/
Started fresh HCOM conversation

Reset Hooks

hcom reset hooks
Removes hcom hooks from all tool configs:
  • Claude Code (~/.claude/settings.json)
  • Gemini CLI (~/.gemini/settings.json)
  • Codex (~/.codex/)
  • OpenCode (~/.config/opencode/)
Hooks are automatically reinstalled when you run any hcom command. Use this to clean up if hooks are causing issues.

Reset All

hcom reset all
Nuclear option. Completely resets hcom to factory state:
1

Stop all instances

Kills processes, logs snapshots.
2

Archive database

Saves to ~/.hcom/archive/session-{timestamp}/.
3

Clear database

Deletes hcom.db.
4

Remove hooks

Removes hooks from all tools.
5

Reset config

Archives and deletes config.toml and config.env.
6

Clear device identity

Deletes device UUID (new ID on next relay connection).
7

Clear instance counter

Resets agent name counter.
When to use:
  • Starting completely fresh
  • Troubleshooting persistent issues
  • Before uninstalling hcom
  • After testing/experimenting

Confirmation Gate

Inside AI tools, hcom reset requires --go flag:
hcom reset --go
hcom reset hooks --go
hcom reset all --go
This prevents accidental resets. You’ll see a preview first:
== RESET PREVIEW ==
This will archive and clear the current hcom session.

Current state:
  • 3 instances: luna, nova, kira
  • 127 events in database

Actions:
  1. Archive database to ~/.hcom/archive/session-<timestamp>/
  2. Delete database (hcom.db, hcom.db-wal, hcom.db-shm)
  3. Log reset event to fresh database
  4. Sync with relay (push reset, pull fresh state)

Note: Instance rows are deleted but snapshots preserved in archive.
      Query archived sessions with: hcom archive

Add --go flag and run again to proceed:
  hcom --go reset

Archive vs Reset

Archive (hcom archive)

Read-only. Query past sessions without affecting current state.
hcom archive
hcom archive 1

Reset (hcom reset)

Destructive. Archives current session and clears database.
hcom reset
hcom reset all

What Gets Archived

Included

  • All events (messages, status changes, lifecycle)
  • All instance records (names, sessions, directories)
  • Read receipts
  • Subscriptions

Not Included

  • Transcripts (stored separately in tool directories)
  • Config files (unless reset all)
  • Launched processes (stopped before archive)

Cleanup

hcom reset also cleans temporary files:
  • Launch scripts >24 hours old
  • Prompt temp files >24 hours old
  • Background logs >30 days old

Sandbox Mode

If using HCOM_DIR for project-local hcom:
export HCOM_DIR="$PWD/.hcom"
hcom reset                      # Resets local instance
To completely remove:
hcom hooks remove && rm -rf "$HCOM_DIR"

Examples

hcom reset
# Stops all, archives, clears DB

Recovery

Restore from Archive

Archives are read-only. To restore:
  1. Find the archive:
hcom archive
  1. Copy database:
cp ~/.hcom/archive/session-2026-03-04_143022/hcom.db ~/.hcom/hcom.db
  1. Restart agents manually (transcripts still exist)
Restoring from archive does NOT restart agents or restore PIDs. You’ll need to manually relaunch.

Undo Reset Hooks

hcom hooks add
# Or
hcom hooks add claude
hcom hooks add gemini

Undo Reset All

No automatic undo. You’ll need to:
  1. Restore database (see above)
  2. Reinstall hooks: hcom hooks add
  3. Reconfigure: hcom config
  4. Reconnect relay: hcom relay connect <token>

Tips

Reset before starting new projects to keep archives organized.
Use hcom archive --here to filter archives by directory after reset.
reset all clears device identity. You’ll get a new UUID on next relay connection.

Troubleshooting

”No HCOM conversation to clear”

Database is already empty. Nothing to archive.

”Error: Failed to archive”

Check permissions on ~/.hcom/archive/. Create manually:
mkdir -p ~/.hcom/archive

Hooks not removed

If reset hooks fails, manually remove:
hcom hooks remove all
Or edit tool config files directly:
  • ~/.claude/settings.json
  • ~/.gemini/settings.json
  • ~/.codex/
  • ~/.config/opencode/

Relay still syncing after reset

Reset pushes a reset event to relay. Remote devices will see the reset and clear their sync state. If issues persist:
hcom relay daemon restart

Build docs developers (and LLMs) love