Hidden Features of Claude Code: Hooks, Memory, and Auto-mode in the Source Code

Claude Code's source code contains a whole set of features that Anthropic doesn't document. These include hooks for rewriting commands, automatic approval of safe operations, persistent agent memory between sessions, auto-mode, and self-learning memory cycles. All of this already works right now — developers just need to look into node_modules.

AI-processed from Habr AI; edited by Hamidun News
Hidden Features of Claude Code: Hooks, Memory, and Auto-mode in the Source Code
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
Key metric #1Hooks that rewrite commands on the fly without session reload
Key metric #2Automatic approval of safe operations without dialog confirmation
Key metric #3Persistent agent memory between sessions and projects

Claude Code revealed its secrets. It turned out that Anthropic's tool source code contains functions that are not in the official documentation. Developers who looked into node_modules found hooks for command modification, automatic operation approval, persistent agent memory, and self-learning memory cycles.

What Features Are Hidden in the Source Code

Claude Code documentation tells only part of the story. The codebase contains ready-made solutions for automating routines that usually have to be done manually or bypassed altogether. These features already work now, but Anthropic prefers not to advertise them in official guides. Perhaps because they are still experimental or require deep understanding of the architecture.

  • Hooks that rewrite commands on the fly without session reload
  • Automatic approval of safe operations without dialog confirmation
  • Persistent agent memory between sessions and projects
  • Auto-mode that understands environment descriptions in plain English
  • Self-learning memory cycles and 'dreams' for context preservation
  • Hidden config fields: skills, agents, and permissions that aren't documented at all

How This Works Right Now

All of these capabilities work in production without waiting for an official release. Developers just need to open their own node_modules and extract ready-made JSON configs and examples. Some start working with minimal modifications, while others require deep understanding of Claude Code's internal architecture and its interaction with the environment. A complete technical document was published on Habr: it contains JSON configs, shell hooks, and examples that can be used almost as-is.

'Claude Code's source code is in your node_modules.

There's more specifics, JSON configs, shell hooks, and examples that you can take almost without modifications.'

Why Is This Hidden

The reasons can be varied. Perhaps the API is still unstable or requires additional preparation. It could be that Anthropic deliberately leaves room for experimentation by curious developers without cluttering the documentation. Or it's a balance: power for power-users, simplicity for the mass audience that just wants to write code.

What This Means

Documentation is not the complete source of truth. Powerful functionality can be hidden in plain sight, simply not mentioned in official guides. For those willing to dive into the source code, this opens a path to automation and workflow control. For Anthropic, it's a signal: the community wants more transparency and is ready to explore the source code on its own.

Story

Key Questions Answered

What Features Are Hidden in the Source Code?

Claude Code documentation tells only part of the story. The codebase contains ready-made solutions for automating routines that usually have to be done manually or bypassed altogether. These features already work now, but Anthropic prefers not to advertise them in official guides. Perhaps because they are still experimental or require deep understanding of the architecture. Hooks that rewrite commands on the fly without session reload Automatic approval of safe operations without dialog confirmation Persistent agent memory between sessions and projects Auto-mode that unders

How This Works Right Now?

All of these capabilities work in production without waiting for an official release. Developers just need to open their own node_modules and extract ready-made JSON configs and examples. Some start working with minimal modifications, while others require deep understanding of Claude Code's internal architecture and its interaction with the environment. A complete technical document was published on Habr: it contains JSON configs, shell hooks, and examples that can be used almost as-is. 'Claude Code's source code is in your node_modules. There's more specifics, JSON configs

Why Is This Hidden?

The reasons can be varied. Perhaps the API is still unstable or requires additional preparation. It could be that Anthropic deliberately leaves room for experimentation by curious developers without cluttering the documentation. Or it's a balance: power for power-users, simplicity for the mass audience that just wants to write code.

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Hands-On AI Engineering · Hamidun Academy

Build & Ship Production AI Agents Without Boilerplate Code

Start your free 72-hour trial at Hamidun Academy (academy.hamidun.com) — interactive lessons on Claude Code & Cursor, live Tech Radar, and production agent templates.

Start 72h Free Trial →Vibe-Coding Intensive
What do you think?
Loading comments…