# How do I keep Claude Code and Codex on the same rules?

Canonical: [How do I keep Claude Code and Codex on the same rules?](https://contextingo.com/answers/how-to-keep-claude-code-and-codex-rules-in-sync)

Locale: en

Purpose: Keep shared rules in AGENTS.md and start CLAUDE.md with `@AGENTS.md`, so both tools read them. For what changes during the work, connect both to the same Contextingo project. One setup command installs the same hook in both, so saving does not depend on which model remembers to.

Content updated: 2026-10-29

Source revision: content.ts 2026-10-29

Maintenance owner: the Contextingo site owner

[Topic map](https://contextingo.com/llm/topics/answers.md) · [Complete scoped map](https://contextingo.com/sitemap.md)

**Short answer.** Keep shared rules in AGENTS.md and start CLAUDE.md with `@AGENTS.md`, so both tools read them. For what changes during the work, connect both to the same Contextingo project. One setup command installs the same hook in both, so saving does not depend on which model remembers to.

## What the hook does

- At the start of a chat: reads the brief once.
- At every prompt: save as you go, confirm what you checked.
- At the end of a turn: sends work without a save back once.
- After compaction: saves what the summary would lose.
- After a commit: leaves a checkpoint.

## Go deeper

- [Contextingo vs CLAUDE.md and AGENTS.md](https://contextingo.com/compare/claude-md-agents-md)
- [Claude Code hooks explained: how to run a command when something happens](https://contextingo.com/blog/claude-code-hooks-explained)

## Questions

### Does the hook send my code anywhere?

No. It runs locally and only prompts your AI to save records.
