Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions docs/cost.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,9 @@ this env var is sent as `X-Amzn-Bedrock-Service-Tier` header on all requests. on

## model pricing (may 2026)

> **always reference [anthropic pricing](https://docs.anthropic.com/en/docs/about-claude/models) for current rates.** pricing snapshot below is from may 2026 but anthropic updates rates regularly. this repo's pricing tables go stale fast.
## model pricing

| model | input (per M tokens) | output (per M tokens) |
|-------|---------------------|----------------------|
| claude haiku 4.5 | check official | check official |
| claude sonnet 4.6 | check official | check official |
| claude opus 4.6 | check official | check official |
> **always reference [anthropic pricing](https://docs.anthropic.com/en/docs/about-claude/models) for current rates.** last verified may 21 2026 (claude code v2.1.145). pricing changes frequently and this snapshot will go stale.

## model pricing

Expand Down
6 changes: 6 additions & 0 deletions docs/session-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ from real data: 32% of 30-60 min sessions needed compaction, 54% of 2hr+ session

the data says: sessions that hit compaction average 1.7 compactions. if you're compacting more than twice, the session is too long -- split it.



### autoMemoryEnabled (v2.1.145+)

if `autoMemoryEnabled: true` (default), claude automatically preserves memory before compaction. compaction becomes less destructive -- claude reads the preserved memory on the next turn and continues the plan. this changes the calculus: you can now compact more aggressively without losing context.

## ending a session

when a session ends (ctrl+c, `/exit`, or timeout), two things fire:
Expand Down
12 changes: 12 additions & 0 deletions docs/tips/context-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ good: "the bug is in src/auth/token.ts around line 140, the JWT expiry check"

## five strategies that work



### 6. enable autoMemoryEnabled (v2.1.145+)

set `autoMemoryEnabled: true` in `.claude/settings.json` (default as of v2.1.145). this auto-preserves session context before compaction fires, reducing the "forgetting after compaction" problem. with this enabled, long sessions lose less context per compaction.

```json
{
"autoMemoryEnabled": true
}
```

### 1. scope before you start

"implement the auth module" is a 2hr session. "add the JWT validation middleware" is 15 min. the tighter your scope, the less context you burn and the lower your compaction risk.
Expand Down
6 changes: 6 additions & 0 deletions docs/tips/fast-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ the "toggle pattern" sounds nice in theory (start normal, switch to fast for exe

fast mode doesn't change your cost on the max plan. you're paying $200/mo flat regardless. the only thing that changes is speed. on per-token billing, fast mode can actually cost MORE bc the mistakes and corrections generate extra tokens that dwarf any savings from reduced thinking.



### v2.1.145 note: CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE

the env var `CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE` is now available for deployments. this suggests fast mode behavior may become configurable at the platform level in future versions. for end users, fast mode behavior remains unchanged unless your deployment explicitly sets this var.

## the one exception

hackathon. 30 minutes to demo. you need something that compiles, not something that's correct. that's the only time speed legitimately matters more than depth.
Expand Down
31 changes: 31 additions & 0 deletions docs/tips/hooks-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ hooks come in five flavors now (v2.1.118 added `mcp_tool`). pick the wrong one a





### v2.1.145 additions: Stop and SubagentStop hooks

Stop and SubagentStop hooks now receive `background_tasks` and `session_crons` arrays in JSON input. use this to warn before stopping a session with active background work.

```bash
BACKGROUND_TASKS=$(echo "$INPUT" | jq -r '.background_tasks // []')
if [[ $(echo "$BACKGROUND_TASKS" | jq 'length') -gt 0 ]]; then
echo "warning: $(echo "$BACKGROUND_TASKS" | jq 'length') background tasks still running"
exit 1
fi
exit 0
```

### effort level in hooks (v2.1.133+)

hooks now receive the active effort setting via two channels:
Expand All @@ -38,6 +53,22 @@ if [[ "$EFFORT" == "max" ]]; then
fi
```



### new effort option: xhigh (v2.1.145+)

effort now has five levels: `low`, `medium`, `high`, `xhigh`, `max`. xhigh sits between high and max, useful for tasks that need deep reasoning but not quite max-level compute. update hooks that check effort to handle the new level:

```bash
EFFORT=$(echo "$INPUT" | jq -r '.effort.level // "medium"')
case "$EFFORT" in
max|xhigh) # relax constraints at high effort
;;
*) # standard constraints
;;
esac
```

### updatedToolOutput (PostToolUse, v2.1.121+)

PostToolUse hooks can now replace tool output before claude sees it. return `{"hookSpecificOutput": {"PostToolUse": {"updatedToolOutput": "your replacement text"}}}` to modify what claude receives from the tool.
Expand Down
8 changes: 8 additions & 0 deletions docs/tips/settings-hierarchy.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ if you're using claude code through an embedding host platform (IDE plugin, plat





### v2.1.145: new settings categories

- `claudeMdExcludes` -- glob patterns to exclude from CLAUDE.md auto-injection (e.g., `["docs/**", "*.test.md"]`). add to project settings if your CLAUDE.md grows from many files.
- `autoMemoryEnabled` -- auto-preserve session memory before compaction (default: true). set to false if you want manual `/compact` control only.
- `worktree.bgIsolation` -- isolate background worktree spawns from parent session's file changes (default: true). set to false only if you need parent/bg worktree to share uncommitted state.

### new in v2.1.121: status line input fields

two new display settings control what appears in the input status line:
Expand Down
14 changes: 14 additions & 0 deletions docs/tips/subagents.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@ use worktree isolation for:

skip it for read-only research. worktree setup adds overhead you don't need when the agent is just reading files.



### worktree.bgIsolation setting (v2.1.145+)

by default, background worktrees (spawned by agents in the background) are isolated from parent session file changes via `worktree.bgIsolation: true`. this prevents agents from seeing your live edits mid-task. set to false only if you need real-time file sync between parent and background worktrees.

```json
{
"worktree": {
"bgIsolation": true
}
}
```

## the scout pattern

send a cheap model to explore, then a capable model to act. each subagent is its own billing stream, so model choice matters.
Expand Down