šŸ› fix(claude): the guard lets athya-rules agent wait and status run

Merged
AT
10d ago
+8-0

Slice: #516

kavach's worktree guard refused athya-rules agent wait and agent status as an unknown program, so a niyam session could not wait on a routed subagent with Bash run_in_background, which is what the athya plugin's hook (athya-rules 0.5.9) asks for first. This adds one reviewedCLIs entry naming only those two subcommands. Both only read: in athya-rules 0.5.9, src/agent/wait.ts reads its --out file and <out>.running marker, and src/agent/status.ts reads ~/.local/state/athya-rules/agents/. agent run and agent hook stay refused.

Approved by Alok on #517 (approved label, 2026-11-20), after asking for it in chat: "Yes, open niyam PR".

Evidence

kavach 0.7.6's worktree_guard.py (sarathi's pin), run on Bash events from this worktree with KAVACH_CONFIG set to main's .claude/kavach.json, then to this branch's:

main   refused (exit 2)   athya-rules agent status
main   refused (exit 2)   athya-rules agent wait --out '…/results/….json'
main   refused (exit 2)   athya-rules agent wait --out '…/results/….json' --timeout 600
main   refused (exit 2)   athya-rules agent run --prompt-file '/tmp/p.md' --name x --out …
main   refused (exit 2)   athya-rules agent hook
branch allowed            athya-rules agent status
branch allowed            athya-rules agent wait --out '…/results/….json'
branch allowed            athya-rules agent wait --out '…/results/….json' --timeout 600
branch refused (exit 2)   athya-rules agent run --prompt-file '/tmp/p.md' --name x --out …
         BLOCKED: … athya-rules is a reviewed CLI here (worktree.reviewedCLIs), a…
branch refused (exit 2)   athya-rules agent hook

The live guard reads the main checkout's settings ($CLAUDE_PROJECT_DIR), so the Bash form works in sessions once this merges and the main checkout pulls it.

šŸ¤– Generated with Claude Code


Summary by cubic

Fixes kavach's worktree guard refusing athya-rules agent wait and agent status, so a niyam session can wait on a routed subagent with Bash run_in_background.

Changes

  • Adds one reviewedCLIs entry in .claude/kavach.json covering those two subcommands.
  • Both only read local state and write nothing; agent run and agent hook stay refused.