Document td concurrency rule in CLAUDE.md and AGENTS.md

Sub-agents must never call td commands directly. Concurrent writes
from parallel agents corrupt the SQLite database. Only the
orchestrator manages td task lifecycle.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-19 19:33:21 -04:00
parent 3d41c623bc
commit 16ba4166f2
2 changed files with 5 additions and 0 deletions

View File

@@ -7,3 +7,7 @@ Sessions are automatic (based on terminal/agent context). Optional:
- td session --new to force a new session in the same context - td session --new to force a new session in the same context
Use td usage -q after first read. Use td usage -q after first read.
## CRITICAL: Sub-agents must NOT call td
Only the orchestrating Claude instance may call `td` commands. If you are a sub-agent spawned to implement a task, do NOT run `td start`, `td close`, `td update`, or any other `td` command. Concurrent writes to the SQLite database from parallel agents will corrupt it. The orchestrator manages all task lifecycle calls.

View File

@@ -7,6 +7,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
- **Commit after every task**: When a task is complete, stage all changed files and create a git commit before marking the task done. - **Commit after every task**: When a task is complete, stage all changed files and create a git commit before marking the task done.
- **Keep documentation current**: Update `CLAUDE.md` with any new commands, architecture details, or setup steps introduced by your task. Update `PRD.md` only if scope/design decisions changed. - **Keep documentation current**: Update `CLAUDE.md` with any new commands, architecture details, or setup steps introduced by your task. Update `PRD.md` only if scope/design decisions changed.
- **Mark tasks in td**: `td start <id>` when beginning, `td close <id>` when done. - **Mark tasks in td**: `td start <id>` when beginning, `td close <id>` when done.
- **Only the orchestrator touches td**: Sub-agents must never call `td` commands directly. Concurrent `td` writes from parallel agents corrupt the SQLite database. The orchestrator handles all `td start`/`td close` calls before and after delegating to sub-agents.
## Task Management ## Task Management