惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Threatpost
The Hacker News
The Hacker News
AWS News Blog
AWS News Blog
Spread Privacy
Spread Privacy
T
Tenable Blog
C
CERT Recently Published Vulnerability Notes
Cisco Talos Blog
Cisco Talos Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Securelist
P
Privacy & Cybersecurity Law Blog
Know Your Adversary
Know Your Adversary
T
The Exploit Database - CXSecurity.com
Latest news
Latest news
D
Darknet – Hacking Tools, Hacker News & Cyber Security
I
Intezer
F
Fortinet All Blogs
Engineering at Meta
Engineering at Meta
Simon Willison's Weblog
Simon Willison's Weblog
The Register - Security
The Register - Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
L
Lohrmann on Cybersecurity
C
Cyber Attacks, Cyber Crime and Cyber Security
Microsoft Azure Blog
Microsoft Azure Blog
P
Proofpoint News Feed
H
Help Net Security
T
Threat Research - Cisco Blogs
D
DataBreaches.Net
S
Schneier on Security
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
P
Privacy International News Feed
S
Secure Thoughts
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Recorded Future
Recorded Future
C
Cybersecurity and Infrastructure Security Agency CISA
MyScale Blog
MyScale Blog
M
MIT News - Artificial intelligence
Stack Overflow Blog
Stack Overflow Blog
IT之家
IT之家
人人都是产品经理
人人都是产品经理
NISL@THU
NISL@THU
博客园 - Franky
T
Tor Project blog
G
GRAHAM CLULEY
博客园 - 【当耐特】
Jina AI
Jina AI
Security Archives - TechRepublic
Security Archives - TechRepublic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
A
About on SuperTechFans
Hacker News - Newest:
Hacker News - Newest: "LLM"

Analytics Vidhya

Handling Imbalanced Classification: What Works Better Than SMOTE GPT-5.6 Is Here: Sol, Terra, and Luna Loop Engineering for AI Agents: How /loop is Changing AI Workflows DeepSeek DSpark: The Speculative Decoding Trick Behind 400% Faster LLM OKF: Redefining Knowledge Bases for AI Agents Modern VLMs Explained: How GPT-4o, Gemini, Claude Vision, and Qwen-VL Work YOLO26 Tutorial: Object Detection, Pose Estimation & More Large Action Models (LAMs) vs Agentic LLMs: What's the Real Difference? Claude Sonnet 5: The Fable 5 at Home The Best $20 AI Plan: ChatGPT Plus vs Claude Pro vs Gemini Pro GraphRAG vs Vector RAG: Which Retrieval Method is Best? Using AI When You Don’t Trust AI The Self-Improving Loop in AI Agents: Architecture, Benefits, and How it Outperforms Traditional Agent Workflows Harness-1: The 20B Retrieval Subagent That Beats GPT-5.4 at Search Sakana Fugu: Multi-Agent System as a Model Claude's Hidden Art Skill: Making Illustrations With Code System Design for ML Interviews: 10 Real Problems Walked Through Most People Use ChatGPT Wrong: 10 Features and Tips That Changed How I Work OpenAI Just Launched 3 Free AI Courses with Certificates Autoregressive Models: Predicting the Future Using the Past Gemini Omni: AI Video Generation Inside Gemini DiffusionGemma: Google’s Diffusion-Based Open Model for Faster Text Generation Top 10 AI Engineering Tools Everyone is Using in 2026 I Tested Claude Fable 5: Can Anthropic’s Newest AI Deliver on the Hype? Prophet vs NeuralProphet vs TimeGPT vs Chronos: A Practical Comparison Build an Emergency Helpline Voice Agent with LangChain Choosing the Right Vector Database for RAG and AI Applications Google Gemma 4 12B: Architecture, Benchmarks, Access, and Hands-on Guide for Developers How to Choose the Right AI Model for Your Needs Agent Observability with LangSmith, Langfuse, and Arize: A Hands-On Comparison How to Use Claude Managed Agents? Google AI Studio vs Gemini App: What’s the Difference? AI Workflows for Sales Teams: Prospect Research, Lead Qualification, and CRM Updates on Autopilot Using LangGraph 25 Most Influential AI Pioneers to Meet at DataHack Summit 2026 Claude Opus 4.8: A Smarter Model in the Right Direction PySpark Optimization: 12 Proven Techniques to Speed Up Your Spark Jobs 10 Everyday Tasks You Can Automate with AI Today (With n8n Templates) Google Antigravity 2.0: The Full Developer Guide (I/O 2026) Build a Claude Cowork-Like Browser Agent Using Playwright MCP and Claude Desktop Pandas vs Polars vs DuckDB: Which Library Should You Choose? Qwen3.7-Max: Alibaba’s New Agent-First LLM for Coding, Reasoning, and Long-Horizon AI Workflows The Biggest Announcements from Google I/O 2026 Top 9 AI Events and Conferences in 2026 that you Must Attend Gemini 3.5 Flash: Frontier Intelligence with Speed Kimi WebBridge: Hands-on Guide to Kimi’s Browser Extension for AI Agents 40 Advanced SQL Window Functions Every Data Scientist Must Know(with examples) Top 10 AI Research Papers of 2025 6 Steps to Crack GenAI Case Study Interviews (With Real Examples) OpenAI Omni Moderation: How to Filter Text & Images for Free DataHack Summit 2026: You Just Cannot Skip This AI Event of the Year OpenAI’s New API Voice Models Will Change the Way You Use AI Hermes Agent Guide: What is it and How to Use it? Top 10 LLM Research Papers of 2026 Agent Memory Patterns in Cognitive Science and AI Systems 10 AI Agents Every AI Engineer Must Build (with GitHub Samples) 23 Tips for Smart Claude Code Token Saving and Workflow Optimization Feature Engineering with LLMs: Techniques & Python Examples ChatGPT is Now Inside Excel and Google Sheets: Here is How to Use it Gemini API File Search: The Easy Way to Build RAG Top 10 Open-Source Libraries to Fine-Tune LLMs Locally ML Intern in Practice: From Prompt to a Shipped Hugging Face Model 15+ Solved Agentic AI Projects with Github Links How People are Figuring Out Life With Claude MemPalace Explained: Building Long-Term Memory for AI Agents Beyond RAG Grok Voice Think Fast 1.0: Build Voice AI Agents That Actually Think Compressing LSTM Models for Retail Edge Deployment: A Practical Comparison MCP vs Agent Skills: Different Altogether GPT 5.5 vs Opus 4.7: Which is the Best AI Model Today? What is Agentic AI? Google Deep Research Max: Build Autonomous AI Research Agents in Minutes Meta Muse Spark Review: Is It Worth the Hype? ChatGPT Images 2.0 vs Nano Banana 2: Which is Better? Cursor V3 Explained: The AI Coding Agent That’s Replacing Traditional IDEs in 2026 DeepSeek-V4: The Most Powerful Open-Source Model Ever Is GPT Image 2 the Best Image Generation Model? Token Economics: Why AI is Getting “Cheaper” From Idea to Output: Claude Does the Design Work Opus 4.7 vs Opus 4.6: Should You Switch? Build Human-Like AI Voice App with Gemini 3.1 Flash TTS How to Structure a Claude Code Project that Thinks Like an Engineer Gemma 4 Tool Calling Explained: Build AI Agents with Function Calling (Step-by-Step Guide) Anthropic Launches Claude Opus 4.7 For “Most Difficult Tasks” Top 28 Claude Shortcuts that will 10X your Speed GPT-5.4-Cyber: Why OpenAI is Keeping its Most Powerful Model Under Lock and Key Google AI Studio Guide: Every Feature Explained Mastering Deep Agents: Context Engineering that Actually Works 21 Computer Vision Projects from Beginner to Advanced (2026 Guide) Excel 101: Excel Agent Mode Explained MiniMax M2.7 Goes Open-Weight to Let You Run Agents Locally Top 10 Gemma 4 Projects That Will Blow Your Mind GLM-5.1: Architecture, Benchmarks, Capabilities & How to Use It Understanding BERTopic: From Raw Text to Interpretable Topics From Karpathy’s LLM Wiki to Graphify: AI Memory Layers are Here 10 Most Important AI Concepts Explained Simply Project Glasswing is World’s Most Powerful AI in Action How to Run Gemma 4 on Your Phone Without Internet: A Hands-On Guide Running Claude Code for Free with Gemma 4 and Ollama LLM Wiki Revolution: How Andrej Karpathy’s Idea is Changing AI Rethinking Enterprise Search: How Cortex Search Turns Data into Business Impact Google’s Gemma 4: Is it the Best Open-Source Model of 2026?
Claude Code vs Codex: A Detailed Terminal Agent Comparison
Harsh Mishra · 2026-04-27 · via Analytics Vidhya

Coding assistants have moved beyond autocomplete into full agents that can read projects, run commands, edit files, and iterate toward outcomes. Tools like Claude Code and Codex both operate in this space, but take different approaches. Claude Code centers on a unified agent loop across environments, while Codex spreads capabilities across CLI, IDE extensions, cloud workflows, and delegated tasks.

This isn’t about model performance. It’s about workflow: control, intuitiveness, and how easily you can stay focused while working inside a real repository. In this article, we compare how each tool fits into the act of getting work done.

Getting started with Claude Code and Codex CLI

Before moving onto the real workflows, First let’s install both the tools in our system. Please make sure your system has node already installed. 

Codex CLI 

Install the Codex CLI with npm. Open your terminal and run 

npm i -g @openai/codex

Run Codex in a terminal. It can inspect your repository, edit files, and run commands. 

Codex 

Sign in with an OpenAI account or API key

OpenAI Codex

Claude Code 

Install the Claude Code with npm. Open your terminal and run 

npm install -g @anthropic-ai/claude-code 

Run in terminal by changing the directory to particular project 

claude 

Sign in with an Anthropic Account

Claude Code

Now all set, let’s move to workflows.

The first 10 minutes feel different

Claude Code feels like an assisted partner. It wants to get a handle on the repo, suggest a plan, then proceed with the task with mode permission and checkpoints to keep it safe. Codex feels like a configurable runtime. It’s still conversational, but the focus is more on configuration, policies, worktrees, review, and cloud delegation. 

If you are opening a repo for the first time, the hands-on difference shows up immediately. 

With Claude Code, a natural first move is:

Explain the auth flow, list the risky files, and tell me where login could be failing.

Authentication flow for claude code

With Codex, the equivalent feels like: 

Explain the auth flow, list the risky files, and tell me where login could be failing 

Codex authentication flow

The same prompt, but the experience is very different. Claude often encourages you to plan and execute. With Codex it feels like it asks you to set the parameters of freedom, sandboxing and approvals before jumping in. 

That difference matters. If you like being guided to productivity, you will like Claude Code more. If you like to design a system, Codex is more rewarding. 

The Translation Layer: How the concepts map?

Much of the confusion of Claude Code vs Codex is due to different terminology. 

Aspect Claude Code Codex
Repo Instructions Stored in CLAUDE.md Stored in AGENTS.md
Memory Auto memory Explicit Memories system
Session State Checkpoints and /rewind for code and session state Emphasis on code reviews and structured code state
Code Management Inline iteration with checkpoints Worktrees and review-driven workflows
Remote Work Remote Control resumes local sessions (runs on your desktop) Remote connections, app-server workflows, and cloud delegation via web
Execution Model Local-first, session continues on your machine Local + remote + cloud execution split across environments
Agent Workflows Supports subagents and parallel agent workflows Explicit subagent workflows with structured orchestration
Parallelism Built-in parallel agent execution Parallelism via worktrees and orchestrated agents
Overall Approach Unified, session-centric workflow Distributed, system-oriented workflow

This is the model to keep in mind when you read the rest of this article. 

Repo instructions: CLAUDE.md vs AGENTS.md

This is a critical part of the article because it affects how the agent feels after the first day. 

Claude Code loads CLAUDE.md at the beginning of each session and uses it as context for the project, your Workflow, or even your company. Anthropic’s documentation is clear that you should use CLAUDE.md to capture the rules you don’t want to repeat, and use auto memory for Claude’s learning.  

The Codex solution uses AGENTS.md, but in a more sophisticated way. You could have a global ~/.codex/AGENTS.md, then AGENTS.md per repo, then sub AGENTS.override.md, all as part of the config.toml structure.  

Here’s how it might work. 

Here’s a useful CLAUDE.md for a Node repo: 

CLAUDE.md

A useful AGENTS.md for the same repo might look like this: 

agents.md

The hands-on lesson is simple. Do not wait until the agent disappoints you five times. Write the instruction file early. Both tools get much better once your standards live in the repo instead of in your head. 

Memory: What gets remembered and how useful it really is?

The context window for Claude Code is wiped at the start of each session, but you can load your CLAUDE.md and auto memory. According to Anthropic, auto memory is notes that Claude writes based on your corrections and preferences, such as build commands, debugging hints and things it has noticed while editing in that tree.  

Codex Memories are similar but they are slightly more explicit. Memories are disabled by default, are stored locally (in ~/.codex), and are for fixed preferences, common routines, project-specific conventions, and common gotchas. The OpenAI docs also advise not to store memories of rules as the only place for rules that must always be followed. Those still need to go in AGENTS.md or in documents in the repo.  

This results in a great workflow. 

If you are using Claude Code, you can have the agent learn the pace of the repo, then use CLAUDE.md for things you need to keep stable. 

If you are using Codex, do not put the contract in Memories. Put the contract in AGENTS.md. Put your platform rules in config.toml. Let memories fill in the gaps. 

This makes Codex feel more mechanical. Claude is more like a smart teammate. 

Permissions and planning: This is where the personality split becomes obvious

Claude Code has very descriptive names for permission modes. The available modes are currently default, acceptEdits, plan, auto, dontAsk, and bypassPermissions. plan is particularly interesting as it allows Claude to plan and propose changes without touching your source, and auto is a research preview that uses an extra classifier to filter actions.  

Codex describes this in terms of sandbox and approval policy. OpenAI’s documentation calls sandbox mode the technical sandbox and approval policy the rule for when to ask permission. Local Codex by default uses no networking and sandboxing under the OS, which is normally configured via ~/.codex/config.toml and, optionally, project-specific .codex/config.toml.  

Here is the hands-on version. 

If you want Claude Code to inspect a repo and produce a proposal before touching anything: 

claude --permission-mode plan 
Claude code plan mode one

If you want Claude Code to move faster on safe file edits: 

claude --permission-mode acceptEdits 
Claude code edits mode enabled

If you want Codex configured for a tighter read-only pass first, the OpenAI docs show patterns like this: 

Open the .codex/config.toml file and add the following lines:

[profiles.readonly_quiet] 
approval_policy = "never" 
sandbox_mode = "read-only"
config.toml

Then you can use that kind of profile for a first-pass audit and only relax it when you are ready. 

This difference matters a lot in real teams. Claude exposes the safety model as an interaction pattern. Codex exposes it as a system configuration pattern. 

Real bug-fix loop: Where the tools start to separate

Let’s say your checkout test is failing and you want the agent to investigate, fix, verify, and explain the change. 

A good Claude Code workflow looks like this: 

Find why the checkout is failing. Start in plan mode, identify the smallest safe fix, implement it, run the relevant tests, and summarize the change in plain English. 

Real bug loop fix

A good Codex workflow looks like this: 

Investigate the checkout failure, keep scope minimal, explain root cause first, then patch only the files required, run the smallest relevant test set, and show me the diff I should review. 

Running the diff command to see the changes
Running the diff command to see the changes

Notice the difference. With Claude Code, you naturally lean into flow. With Codex, you naturally lean into explicit scope and review language. 

Both tools can do the loop, but they encourage slightly different styles of prompting. 

Undo, recovery, and reviewing changes

Claude Code’s undo/rewind is a powerful feature. Anthropic claims that every user-prompted change makes a checkpoint, the checkpoints are persistent, and /rewind can restore code, conversation, or both. So you can “experiment” more without worrying about mistakes.  

A “real” use case looks like this: 

/rewind 

Then you choose whether to just rewind the code, just the chat, both, or start summarising from a particular point and continue. 

And Codex addresses safety in another way. The review pane displays the changes in the repo, allows you to add inline comments and to stage, keep or revert lines. The app also uses worktrees so many things can happen while you work on your checkout. 

So the practical split is this: 

Claude says, “Try the risky thing. You can rewind.” 

Codex says, “Let the work happen in isolation. Then inspect it carefully.” 

Both are good. They just change how bold you feel while iterating. 

Skills, hooks, and reusable workflows

This is the section where advanced users start building real leverage. 

Claude Code skills use SKILL.md, and Anthropic claims Claude can automatically invoke skills as needed, or you can explicitly use slash commands (e.g. /review-pr or /deploy-staging). Claude also has hooks for running shell commands before or after Claude Code actions, such as formatting, linting or custom validation.  

OpenAI’s docs for Codex focus on progressive disclosure. Codex loads skill metadata and only loads the full SKILL.md when it uses the skill. Codex also uses a built-in $skill-creator, and has hooks as an experimental extensibility framework (feature flag is in place). 

Here is a concrete hands-on pattern you can use in either tool. 

Create a reusable code-review skill that says: 

--- 

name: backend-review

description: Review backend changes for auth bugs, migration risk, logging gaps, and test coverage regressions.

---

When invoked: 

  1. Inspect changed files first 
  2. Prioritize auth, data integrity, and silent failure modes 
  3. Suggest the smallest fixes 
  4. End with a short risk summary 
SKILLS.md

In Claude Code, that becomes something you can naturally call from the conversation. In Codex, that becomes a cleaner reusable unit in a more explicitly managed system. 

Which one should you choose?

Based of the comparison and the features the two offer, here’s a comparison table to summarise it all:

Aspect Claude Code Codex
Onboarding Smoother, more guided experience More setup, geared toward customization
Workflow Style “Keep moving” flow with strong guidance Modular, programmable workflow
Core Strength Feels like an active pair programmer Feels like a platform you can shape
Control Level More implicit, agent-led More explicit, user-controlled
Key Features Checkpointing, plan mode, guided sessions Configs, sandboxing, worktrees, remote and cloud delegation
Best For Rapid prototyping, repo exploration, guided refactors Structured, scalable engineering workflows
Interaction Style Think with the agent Manage and orchestrate the agent
Ideal User Developers who want momentum and ease Developers who want flexibility and system-level control
Overall Feel A strong pair programmer A customizable coding platform

Conclusion

Claude Code wins on simplicity and “flow.” The /rewind feature is a top-tier safety net. The auto-memory system makes it feel smart over time. Choose Claude Code if you want aPair Programmer that just works. It is excellent for rapid prototyping and refactoring. 

Codex wins on precision and configurability. The worktree model is perfect for complex automation. The policy-based permissions suit enterprise security needs. Choose Codex if you want to build a custom platform. It is a robust choice for systematized development. 

These tools are not just competitors. They represent different futures for AI coding. One is a guided agent. The other is a programmable runtime. They are catered to different users and both assist in improving your workflows.

Frequently Asked Questions

Q1. What is the main difference between CLAUDE.md and AGENTS.md?

A. They serve the same purpose for repository instructions. Claude Code uses CLAUDE.md, while Codex uses AGENTS.md, but Claude can import AGENTS.md files for compatibility. 

Q2. Can I use these agents for large, existing codebases?

A. Yes, both are repo-aware. They can index thousands of files to provide context and perform multi-file edits across the whole project. 

Q3. Do these agents require an internet connection?

A. Yes, both need to communicate with LLM providers like Anthropic or OpenAI. Codex supports some local shell escapes, but the reasoning happens in the cloud. 

Harsh Mishra is an AI/ML Engineer who spends more time talking to Large Language Models than actual humans. Passionate about GenAI, NLP, and making machines smarter (so they don’t replace him just yet). When not optimizing models, he’s probably optimizing his coffee intake. 🚀☕