Home › Learn

Learn

How Claude Code, Codex and OpenCode work underneath, and how to hook into them

Hooks, sessions, memory and helper agents in the three runtimes. Each tutorial lists the versions it was checked on, the date it was checked, and how we know each claim.

Tutorials

Read them in order or start with the one you need. None of them needs Crossing Guard installed.

  1. 01 · Tutorial

    Claude Code hooks, Codex hooks and OpenCode plugins, desktop apps included

    The Claude and Codex desktop apps run the same runtime as the terminal, and it reads your hook configuration. Log tool calls, block them, and add notes for the model with a short script.

    Claude Code · Codex · OpenCode · verified 2026-09-25

  2. 02 · Tutorial

    Spontaneous Memory: a second agent that reminds your session of past decisions

    On each prompt, a helper searches the decisions you wrote down and hands the main agent a note when one applies. Build it with two Claude Code hooks and a Python script, then see it as a Crossing Guard profile.

    Claude Code · Crossing Guard · verified 2026-09-25

  3. 03 · Tutorial

    What Claude Code remembers between sessions, and where it keeps it

    We asked Claude to remember one preference, opened the auto memory files it wrote, and checked what a fresh session did with them.

    Claude Code · verified 2026-09-25

  4. 04 · Tutorial

    How Claude Code loads CLAUDE.md, and what a long one costs

    A short hook logs every CLAUDE.md load and its reason. A 200-line file added about 5,400 tokens to every request, and moving it into an import saved nothing.

    Claude Code · verified 2026-09-25

  5. 05 · Tutorial

    One MCP server in Claude Code, Codex and OpenCode, and how each one tells you it's broken

    The config file for each runtime and a real tool call from each. Then a bad URL: Codex's list still says "enabled", and all three sessions carry on without the tools.

    Claude Code · Codex · OpenCode · verified 2026-09-25

  6. 06 · Tutorial

    One skill for Claude Code, Codex and OpenCode: where each looks, and how to tell it loaded

    One SKILL.md reaches all three with a symlink. A correct answer doesn't prove the skill loaded, and OpenCode silently skips a skill whose frontmatter isn't valid YAML.

    Claude Code · Codex · OpenCode · verified 2026-09-25

Reference

The same pages, listed by the part of the configuration they cover.

The shelf
PageCoversStatus
Hooks across runtimesWhere hooks live, what they receive and how they answer, in Claude Code, Codex and OpenCodePublished
Claude Code memoryWhat loads into a session, when, and from wherePublished
CLAUDE.md loading and sizeProject instruction files and their limitsPublished
MCP config across runtimesDeclaring tool servers in each runtimePublished
Skills across vendorsPackaged instructions, and how each runtime finds themPublished

How we write these

Each factual sentence in a tutorial has a label: Observed on a real install, In source (not yet public), from Vendor docs, or Not verified. Each page names the versions it was checked on and a date by which it will be checked again. When a vendor changes a hook, we update the page and its dates.