diff --git a/agents/docs/state.md b/agents/docs/state.md index c943b940..0e63475d 100644 --- a/agents/docs/state.md +++ b/agents/docs/state.md @@ -1,14 +1,14 @@ --- -last_checked_commit: a4a1823 -last_run: "2026-11-10T08:02:38Z" -docs_gaps_found: 0 -branches_created: ["docs/auto-update-2026-02-21", "docs/auto-update-2026-03-01", "docs/auto-update-2026-03-05", "docs/auto-update-2026-03-07", "docs/auto-update-2026-03-13", "docs/auto-update-2026-06-30", "docs/auto-update-2026-07-10"] +last_checked_commit: da1f2ec +last_run: "2026-11-16T08:06:03Z" +docs_gaps_found: 2 +branches_created: ["docs/auto-update-2026-02-21", "docs/auto-update-2026-03-01", "docs/auto-update-2026-03-05", "docs/auto-update-2026-03-07", "docs/auto-update-2026-03-13", "docs/auto-update-2026-06-30", "docs/auto-update-2026-07-10", "docs/auto-update-2026-11-16"] status: completed --- # Documentation Audit State -**Last Updated:** 2026-11-10 +**Last Updated:** 2026-11-16 This document tracks the state of the documentation audit agent, enabling incremental reviews that analyze only new commits since the last check. @@ -19,10 +19,10 @@ incremental reviews that analyze only new commits since the last check. | Metric | Value | Notes | |--------|-------|-------| -| Last checked commit | a4a1823 | security: daily audit 2026-11-09 - GREEN status | -| Last run | 2026-11-10T08:02:38Z | Manual invocation | -| Gaps found (last run) | 0 | All commits were agent housekeeping or docs updates | -| Branches created | (none this run) | Audit-only, no gaps found | +| Last checked commit | da1f2ec | chore: version packages (#492) | +| Last run | 2026-11-16T08:06:03Z | Manual invocation | +| Gaps found (last run) | 2 | SDK permission and fork subagent behavior changes | +| Branches created | docs/auto-update-2026-11-16 | Created branch with docs and PR | --- @@ -30,6 +30,7 @@ incremental reviews that analyze only new commits since the last check. | Date | Commits Analyzed | Gaps Found | Action | Branch | |------|-----------------|------------|--------|--------| +| 2026-11-16 | 7 | 2 | created-branch | docs/auto-update-2026-11-16 | | 2026-11-10 | 5 | 0 | no-gaps | (none) | | 2026-11-08 | 6 | 0 | audit-only | (none) | | 2026-11-06 | 3 | 0 | audit-only | (none) | diff --git a/docs/src/content/docs/configuration/environment.md b/docs/src/content/docs/configuration/environment.md index a63d8c15..bf77808f 100644 --- a/docs/src/content/docs/configuration/environment.md +++ b/docs/src/content/docs/configuration/environment.md @@ -320,6 +320,35 @@ While herdctl doesn't require specific environment variables, these are commonly --- +## Claude Code Runtime Variables + +These environment variables control the behavior of Claude Code when running agents. They are inherited from the parent process and affect all agent sessions: + +| Variable | Description | Default | +|----------|-------------|---------| +| `CLAUDE_CODE_FORK_SUBAGENT` | Enable fork subagents (spawn subagents in a separate process) | `1` (enabled) | +| `HERDCTL_LOG_LEVEL` | Log level for herdctl runtime (`debug`, `info`, `warn`, `error`) | `info` | + +### Fork Subagents + +As of Claude Agent SDK 0.3.302, fork subagents are enabled by default. When enabled, subagents launched via the Task tool run in a separate process, providing better isolation and resource management. + +**Enable fork subagents (default):** + +```bash +export CLAUDE_CODE_FORK_SUBAGENT=1 +``` + +**Disable fork subagents:** + +```bash +export CLAUDE_CODE_FORK_SUBAGENT=0 +``` + +When fork subagents are disabled, subagents run in the same process as the parent agent. This can be useful for debugging or when resource isolation is not needed. + +--- + ## Complete Example Here's a full configuration demonstrating environment variable usage: diff --git a/docs/src/content/docs/configuration/permissions.md b/docs/src/content/docs/configuration/permissions.md index de249a79..8964dd10 100644 --- a/docs/src/content/docs/configuration/permissions.md +++ b/docs/src/content/docs/configuration/permissions.md @@ -204,7 +204,7 @@ denied_tools: | `Glob` | Find files by pattern | Low | | `Grep` | Search file contents | Low | | `Bash` | Execute shell commands (use patterns) | High | -| `Task` | Launch subagents | Medium | +| `Task` | Launch subagents (see [fork subagents](/configuration/environment/#fork-subagents)) | Medium | | `WebFetch` | Fetch web content | Medium | | `WebSearch` | Search the web | Medium | | `TodoWrite` | Manage task lists | Low | @@ -226,6 +226,10 @@ allowed_tools: - "Bash(make build)" # Specific make target ``` +:::note[Git Commands and Permission Flow] +As of Claude Agent SDK 0.3.325, read-only git commands (like `git status`, `git diff`, `git log`) go through the permission flow instead of being auto-approved. If you want to pre-approve these commands, include `Bash(git *)` in `allowed_tools`. Agents with `Bash` already in `allowed_tools` are unaffected. +::: + **Deny dangerous patterns:** ```yaml