jeikeilim/tenet/tenet-diagnose
Claude Code and agent skill by jeikeilim/tenet
- community
Checking that the SKILL.md file is still in the repository.
Diagnose tenet project issues by inspecting SQLite state, job history, event logs, and .tenet/ directory structure. Use when: tenet is misbehaving, jobs are stuck, eval keeps failing, MCP server won't start, or you need to understand what happened during an autonomous run. Triggers on: 'tenet diagnose', 'what went wrong', 'why did tenet fail', 'debug tenet', 'tenet health', 'check tenet state'.
Install
npx vskill@latest install jeikeilim/tenet/tenet-diagnoseSKILL.md
Tenet Diagnose Skill
You are a tenet diagnostic expert. You know tenet's internals: SQLite schema, job lifecycle, MCP server architecture, adapter invocation, and the .tenet/ directory structure.
Quick Start
Run these diagnostic queries to get a full picture:
Before mutating anything, preserve evidence and prefer read-only checks. If the installed Tenet has DB maintenance commands, start with:
If that reports unsafe, do not run manual UPDATE, VACUUM, checkpoint, or restore commands against the live DB. First archive the current .tenet/.state files and coordinate with the user.
1. Project structure check
Expected lifecycle directories: project/, project/design-components/, runs/, archive/, knowledge/, status/, state-snapshot/, and .state/. Pre-lifecycle projects may also have legacy lanes that tenet init --upgrade migrates into archive/legacy-v1/: spec/, interview/, decomposition/, harness/, journal/, visuals/, bootstrap/, steer/, and knowledge/. .state/ should contain tenet.db and optionally config.json.
2. Database health
Expected columns: id, type, status, params, agent_name, created_at, started_at, completed_at, last_heartbeat, retry_count, max_retries, parent_job_id, error, output, server_id
2a. WAL/base mismatch checks
If .tenet/.state/tenet.db-wal exists, the normal SQLite view includes WAL frames. Compare the normal WAL-backed view with the immutable base DB view:
Interpretation:
- Normal view fails but immutable base is
ok: suspect WAL/base mismatch. Do
not checkpoint. Preserve tenet.db, tenet.db-wal, and tenet.db-shm.
- Indexed and
NOT INDEXEDcounts differ: indexes are unsafe even if some
status queries still appear to work.
- Both normal and immutable views fail: the main DB image is already malformed.
3. Job status overview
4. Failed jobs analysis
Common failure patterns:
- "stall detected" — server restarted while job was running. Check if server_id column exists (migration may be needed). Run
tenet init --upgrade. - "invocation timed out after Xms" — adapter timeout too short. Check
tenet configfor timeout setting. Default is 120 minutes. - "Not inside a trusted directory" from Codex — project trust is missing or marked untrusted in
.codex/config.toml. Runtenet init --upgradeand accept the Codex trust prompt, or edit the project block to settrust_level = "trusted". If Git itself reports "dubious ownership", then add the project to Git's safe directory list withgit config --global --add safe.directory <project-path>. - "no agent adapter available" — the configured agent CLI is not installed or not in PATH.
5. Job timeline
6. Event log
7. Config check
The JSON config file is the source of truth. On server startup, it overwrites SQLite config values. If they disagree, the JSON values win.
8. Steer messages
9. Git vs DB desync check
If git has commits for features that are "pending" in the DB, the agent bypassed the MCP pipeline. This usually happens when the MCP server crashed and the agent continued without it.
10. MCP server status
Common Issues and Fixes
Jobs stuck as "running" after server restart
The server_id mechanism should auto-recover these on restart. First run tenet db check --project . or the read-only integrity checks above. Only if the DB is healthy should you consider manual state repair:
Eval jobs always timing out
Check adapter timeout: tenet config. Default is 120 min. For Playwright e2e jobs that need to start servers + run tests, this may need to be higher.
Agent using wrong CLI
Database locked errors
Tenet uses WAL mode for concurrent reads. If you see "database locked":
Creating a safe DB backup
Do not copy only .tenet/.state/tenet.db while WAL files may exist. Prefer:
Fallback if the command is unavailable and the DB is healthy:
Playwright MCP not working
Adapter picking the wrong model / wrong behavior
If an agent CLI works interactively but fails when invoked by Tenet as a subprocess, it's almost always because the subprocess sees a different default (model, auth profile, sandbox mode) than your interactive session.
Common symptom: opencode works for you manually, but Tenet-spawned opencode jobs fail with "model not available" or similar auth errors — because opencode run picked a built-in default model, not the one in your config.
Diagnose:
Fix by pinning the flag Tenet should inject on every subprocess call:
Pass an empty string to clear a setting: tenet config --opencode-args "".
Restart the Tenet MCP server after changing adapter args — they're read at server startup.
Notes on the mechanism:
- Extra args are stored in
.tenet/.state/config.jsonunderclaude_args/opencode_args/codex_args, with optional job-scoped keys such ascodex_args_interaction_e2e. - They're injected per-CLI at the known-safe position. Codex defaults to
--sandbox workspace-write; global or job-scoped sandbox flags override that default. - Argument splitting is whitespace-based — values cannot contain embedded spaces in v1. If you need quoted values, file an issue.
Reporting
After running diagnostics, summarize:
- Health: Is the DB healthy? Are there stuck jobs?
- Timeline: What was the last successful job? When did things go wrong?
- Root cause: What caused the failure? (timeout, stall, crash, config, etc.)
- Recovery: What's the recommended fix?
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/tenet-diagnose/SKILL.md
Popularity
- Repository stars
- 40
- Repository forks
- 1
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jeikeilim/tenet/tenet-diagnose)