Overview
Theverify command checks the integrity of installed agents by comparing their current file hashes against the SHA-256 hashes stored in .opencode/agents/.manifest-lock.json.
Use this to:
- Detect manual edits to agent files
- Identify corrupted or tampered agents
- Audit agent integrity before deployment
- Verify installation completeness
How It Works
- Load lock file — Reads
.opencode/agents/.manifest-lock.json - Hash installed files — Computes SHA-256 for each agent’s
.mdfile - Compare — Matches current hash against lock file hash
- Report — Categorizes each agent as OK, mismatch, or missing
Output States
✓ OK
Agent file exists and hash matches the lock file entry.✗ Hash Mismatch
Agent file exists but hash differs from the lock file. This indicates:- Manual edits to the agent file
- Corruption
- Permission modifications (if applied after initial install)
⚠ Missing
Agent is recorded in lock file but file doesn’t exist on disk.Example Usage
Basic integrity check
Detecting modified agents
After manually editingtypescript-pro.md:
Missing agents
If an agent file was deleted:Exit Codes
| Code | Meaning |
|---|---|
0 | All agents OK (or no lock entries) |
1 | Hash mismatches or missing agents detected |
Relationship with Permissions
Important: Hash verification runs after permission modifications. If you install an agent with custom permissions (--permissions, --permission-override), the lock file stores the hash of the modified file, not the upstream original.
This means:
- ✅ Installing with
--permissions strictand verifying = OK (hash matches modified version) - ⚠ Installing normally, then manually changing permissions = hash mismatch
install --force with the new permission flags, or run rehash to accept current disk state as the new baseline.
When to Use
Daily development
Daily development
Run
verify periodically to ensure no accidental edits to agent files.Before deployment
Before deployment
Verify agent integrity before deploying to production environments.
After git pull
After git pull
If multiple team members share agents via git, verify after pulling changes.
Security audits
Security audits
Check for tampering or unauthorized modifications to agent system prompts.
Related Commands
- update — Reinstall agents with hash mismatches
- rehash — Rebuild lock file from current disk state
- install — Install agents with permission modifications
Troubleshooting
See Also
- Lock System — Deep dive into lock file format and integrity verification
- Permissions — Understanding permission modifications and their impact on hashes