Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 3.08 KB

File metadata and controls

53 lines (37 loc) · 3.08 KB

Claude Code Review

Overview

Claude Code is a core reference system because it appears to expose higher-order agent runtime concerns such as hooks, policies, skills, subagents, and task-oriented tool usage.

Why It Matters

  • Strong candidate evidence for policy and hook layers.
  • Strong candidate evidence for bounded delegation.
  • Useful for separating runtime core from higher-level composition surfaces.

Source-Backed Findings

  1. Claude Code exposes a rich hook lifecycle around the runtime loop rather than only around session setup. Documented events include PreToolUse, PermissionRequest, PostToolUse, PostToolUseFailure, SubagentStart, SubagentStop, Stop, TaskCompleted, PreCompact, and PostCompact.
  2. Hooks can block completion and stopping. Stop, SubagentStop, and TaskCompleted all support blocking decisions, which is direct evidence for stop-hook and completion-gate semantics living outside plain assistant text.
  3. Claude Code treats subagents as bounded execution contexts. Built-in subagents such as Explore use restricted read-only tools, custom subagents can define tools, disallowedTools, permissionMode, maxTurns, hooks, skills, memory, and isolation, and subagents cannot recursively spawn other subagents.
  4. Subagents are isolated and resumable. Each invocation has its own context window and transcript, can be resumed with preserved history, and supports auto-compaction without mutating the main transcript.
  5. Compaction is explicit in runtime lifecycle. The hook system exposes PreCompact and PostCompact, and subagent docs describe automatic compaction with recorded compact boundaries.
  6. Policy is deliberately layered. Hooks can be implemented as shell commands, HTTP calls, prompt evaluators, or agent-based verifiers, which is strong evidence that many product-specific rules live above a narrower execution core.

Evidence

  • Hook lifecycle and decision control: Claude Code hooks reference.
  • Subagent capabilities, scopes, restrictions, and lifecycle: Claude Code subagents reference.
  • Auto-compaction and resumability: Claude Code subagents reference.
  • Example stop and task-completed validation hooks: Claude Code hooks reference.

Reusable Pattern Candidates

  • Policy and hook insertion points.
  • Bounded subagents.
  • Product-shell composition on top of a narrower runtime core.
  • Stop-hook validation.
  • Runtime compaction events.
  • Scoped memory and skill injection as upper-layer composition mechanisms.

Product-Specific Artifacts To Avoid Generalizing

  • Claude-specific instruction files and naming.
  • Vendor packaging of capabilities.
  • Anthropic-specific hook schemas and settings locations.

Current Confidence

high-confidence convergence for hook surfaces and bounded subagents; medium-confidence convergence for using those surfaces as a general standard pattern.

Source Notes