diagnose-timeout

diagnose-timeout is a command for coding agents from signalcompose/claude-tools. It costs 13 tokens per session (473 once invoked), scanned A, original, MIT.

A diagnostic command for finding why Chezmoi status checks are slow. It measures template processing, Git work, the complete status check, and network connectivity.

In plain words
What is it for?
Use it when `chezmoi status` is slow or times out, to locate the bottleneck and review suggested remedies.
Why use it?
It helps identify whether delays come from templates, 1Password access, Age decryption, Git, or network latency instead of guessing at the cause.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the chezmoi plugin — 6 commands shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/signalcompose/claude-tools/diagnose-timeout
Clone the repo
git clone --depth 1 https://github.com/signalcompose/claude-tools

Or install chezmoi, the plugin that ships this one along with the rest of its 6 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for diagnose-timeout

README.md
[![agentmods](https://agentmods.dev/badge/commands/signalcompose/claude-tools/diagnose-timeout.svg)](https://agentmods.dev/commands/signalcompose/claude-tools/diagnose-timeout)
Your own site
<a href="https://agentmods.dev/commands/signalcompose/claude-tools/diagnose-timeout"><img src="https://agentmods.dev/badge/commands/signalcompose/claude-tools/diagnose-timeout.svg" alt="Measured on agentmods" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 473 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00013 $0.00473
Opus 5 $0.00006 $0.00236
Sonnet 5 $0.00003 $0.00095
Haiku 4.5 $0.00001 $0.00047

Measured 4d ago against content hash b3922790c884, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

diagnose-timeout scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/chezmoi/commands/diagnose-timeout.md · 71 lines

What it actually says

Diagnose chezmoi status Timeout

This command helps diagnose why chezmoi status is slow by measuring timing for different operations.

Usage

以下のBashコマンドを即座に実行してください:

bash ${CLAUDE_PLUGIN_ROOT}/scripts/diagnose-timeout.sh

What it measures

The diagnostic script measures:

  1. Template Expansion: Time to expand templates (includes 1Password API, Age decryption)
  2. Git Status: Time for git operations in the chezmoi source directory
  3. Overall chezmoi status: Total time for the full status check
  4. Network Connectivity: Checks if network latency affects 1Password API

Output Example

━━━ [chezmoi] Timeout Diagnosis ━━━

1. Template expansion: 3.2s
   → High (includes 1Password API, Age decryption)

2. Git status: 0.1s
   → Normal

3. chezmoi status (total): 3.8s
   → Timeout threshold: 30s

Bottleneck: Template expansion (1Password/Age)

Recommendations:
- Increase timeout: export CHEZMOI_STATUS_TIMEOUT=60
- Optimize 1Password API calls
- Consider caching template results

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Common Causes

Cause Impact Solution
1Password API High Cache results, reduce API calls
Age encryption Medium-High Optimize encrypted files
Git operations Low-Medium Check repository size
Network latency Variable Use offline mode or caching

Next Steps

After diagnosing:

  1. If timeout is acceptable: Increase CHEZMOI_STATUS_TIMEOUT
  2. If bottleneck identified: See docs/troubleshooting-timeout.md for solutions
  3. If performance unexplained: Consider optimizing chezmoi configuration
  • CHEZMOI_STATUS_TIMEOUT environment variable
  • /chezmoi:check - Manual status check
  • docs/troubleshooting-timeout.md - Detailed troubleshooting guide
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 71 lines · 13 tokens per session scan A b3922790c884

Subscribe to this mod's changes

diagnose-timeout is a command published in the GitHub repository signalcompose/claude-tools (4 stars, last pushed 7d ago), licensed MIT. It adds 13 tokens to every session and 473 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.