Skip to content

November 19, 2026

Rethinking Claude Code Best Practices

  • As models get better at long-running tasks, how we work with them should change too. Features like auto mode didn’t exist a few model releases ago, so some older practices no longer apply. claude.com
  • We used to start sessions, steer them, approve actions, and check the work. Now one session can coordinate others, and the harness can handle routine approvals and checks. code.claude.com · code.claude.com
  • We’re still in the loop, but more as managers than orchestrators. We’re responsible for the quality of the code and for making sure it runs safely.

Codebase instructions

  • As models get better at understanding our intent and reading the codebase, it’s worth rethinking the instructions we leave in it. Redundant instructions take up context and can distract from the ones that matter. Examples: code.claude.com
    • “Think hard and thoroughly.”
    • “Keep working until it’s done.”
    • “IMPORTANT: always use XYZ.”
    • “We’re using Node.js 22.” (If the repo already pins it.)
  • I’d reserve CLAUDE.md for things that aren’t obvious from the code, like the fact that the mobile app still uses the legacy routes. code.claude.com
  • Use /doctor prompt-audit to flag stale or conflicting instructions. code.claude.com

Auto mode and permissions

  • Auto mode is the built-in default for interactive terminal and VS Code sessions in v2.1.283 and later, unless settings override it. It’s not the default everywhere. code.claude.com
  • Routine reads and ordinary in-project edits generally skip the classifier. A separate model checks actions such as shell commands and network requests. It can let tests or dependency installs run and block actions when it’s unclear whether you authorized them. code.claude.com
  • Auto mode config in ~/.claude/settings.json (... stands for your own entries): code.claude.com
index.json
{  "autoMode": {    "environment": [      "$defaults",      "..."    ],    "allow": [      "$defaults",      "..."    ],    "hard_deny": [      "$defaults",      "..."    ]  }}
  • I couldn’t verify the comparison that people caught 14% of dangerous commands and auto mode blocked 89%, letting about 1 in 10 through. In Anthropic’s published evaluation, auto mode missed 17% of 52 real actions that went beyond what the user authorized. anthropic.com
  • For a hard block on a specific tool call, use permissions.deny. Matching deny rules apply before the classifier. I’d use them for things you can’t take back, like permanently deleting data or exposing a secret. code.claude.com
index.json
{  "permissions": {    "deny": [      "Read(./.env)"    ]  }}

Sandboxing and cloud sessions

  • Permissions decide whether a tool call can run. They don’t constrain what a third-party or compromised script does once it’s running. code.claude.com
  • For sandboxed shell commands, the OS enforces which files they can read, where they can write, and which hosts they can reach. Those limits also apply to child processes. code.claude.com
  • The shell sandbox doesn’t cover Read, Edit, or WebFetch; those tools follow permission rules. Permission rules can also gate MCP tool calls, but they don’t confine local MCP server processes or command hooks. Those run with your user’s access. code.claude.com
  • A hosted cloud session can be safer than running on your laptop. It gets an isolated checkout, keeps running when you close the laptop, and doesn’t need a local worktree per session. I’d keep raw secrets out of that checkout. code.claude.com
  • For credentials a hosted session needs, cloud network secrets stay outside the VM. A proxy attaches the secret to matching requests, so the model doesn’t need the value. The configured third-party service still receives it. code.claude.com
  • The cloud machine is disposable. Changes it makes elsewhere, like commits pushed to the repo, can be permanent. code.claude.com

Verification and review

  • Set checkpoints along the way: tests, builds, screenshots. Claude can understand the intent and still build something reasonable that isn’t what you want or need. code.claude.com
  • A prompt doesn’t guarantee the checks will run. For checks that need to run every time, use command hooks. code.claude.com
    • After each successful Edit (PostToolUse): run lint.
    • Before a task is marked complete (TaskCompleted): run its tests.
    • Before Claude stops (Stop): run all tests.
  • Have the hook exit with 2 for a failed check, not 1. Exit 1 is a non-blocking error, not a pass. Exit 2 can keep a task open or a session working; after PostToolUse, it reports the failure but doesn’t undo the edit. code.claude.com
  • Turn on Auto-fix if you want Claude to see failed CI checks and push fixes to the PR. code.claude.com
  • Merge when ready is opt-in. I’d use it only for low-risk PRs. code.claude.com
  • I’d review the changes in a new session with fresh context. code.claude.com