Claude Code vs Codex: Same task, very different blast radii
Benchmark comparing Claude Code 2.1.72 and Codex CLI 0.113.0 on a 20-line coding task reveals massive gaps in system file access.

Stock photo for illustration only, not from the actual event
- Comparing Claude Code and Codex CLI on a 20-line code modification task
- Claude Code opened 2,779 files while Codex opened 303 files
- Claude Code systematically scans /proc to inherit environment variables
- MCP servers and plugin auto-initializations trigger background network traffic
When software engineers assign a simple coding task to AI coding agents—such as adding input validation to a route handler in a small Node.js/Express service—the task appears straightforward: edit a single file and write roughly 20 lines of code. However, background system monitoring reveals drastically different underlying behaviors between competing tools.
This benchmark test standardized the environment by running Claude Code 2.1.72 and Codex CLI 0.113.0 against a clean copy of a user management service. Every system call was recorded using strace -f to track openat, connect, and execve processes. While both agents successfully completed the task, the digital footprint and operational scope left behind varied significantly.

Stock photo for illustration only, not from the actual event
In terms of file access volume, Claude Code opened 2,779 unique files during the session, whereas Codex opened only 303. Although a large portion of Claude's reads comprised its internal infrastructure such as plugin caches and configuration files, the exact targets of these reads raise important operational security considerations.
During execution, Claude Code attempted to open /proc/<pid>/environ for 752 distinct process IDs, successfully reading 256 of them under the current user. Terminal-launched processes on Linux rely on walking /proc to inherit environment variables exported by parent shells, such as API keys and PATH settings.
"Claude Code successfully opened its /proc/<pid>/environ , which contains the DBUS_SESSION_BUS_ADDRESS and other variables needed to interact with the keyring over D-Bus."
Dev.to Analysis
Notably, successfully read processes included gnome-keyring-daemon, which manages system credentials, SSH keys, and encrypted secrets. While reading the environment file does not directly extract stored secrets, it yields the addressing information required for programmatic D-Bus queries. Codex executed zero /proc/*/environ reads across all test runs.
This analysis highlights how autonomous coding agent design choices impact security posture. Automated environment discovery and background plugin maintenance expand the operational attack surface beyond the immediate coding task, introducing potential risks that developers should carefully monitor.
Furthermore, local log generation showed that Claude Code initialized configured MCP servers for Gmail and Google Calendar upon startup, triggering outbound connections to Google Cloud infrastructure despite the task being entirely offline-focused. Codex exhibited no such background initialization overhead, focusing strictly on standard sandbox shell configuration.
Source: Dev.to
Found something wrong in this article? Report an issue with this article
Comments
Leave a Comment