Applied Intelligence
Module 1: Introduction to ASD

Exercise: Your First Agent Session

Hands-on exercise comparing Claude Code and Codex

Objective

Set up both Claude Code and Codex, then use each to add a simple feature to a small CLI tool. Compare how each agent approaches the same task.

Exercise Repository: cowsay A JavaScript implementation of the classic talking cow generator.

Setup

  1. Clone the repository:
    git clone https://github.com/piuccio/cowsay.git
    cd cowsay
    npm install
  2. Verify the installation works:
    npx cowsay "Hello, world!"

Task

Add a new command-line flag --shout that converts the input text to uppercase before displaying it.

Expected behavior:

npx cowsay --shout "hello world"

Should output the cow saying "HELLO WORLD" instead of "hello world".

Part 1: Using Claude Code

  1. Open a terminal in the cowsay directory
  2. Start Claude Code: claude
  3. Ask Claude Code to add the --shout flag
  4. Observe how the agent explores the codebase
  5. Review the changes before accepting
  6. Test the feature

Record which files Claude Code examined, whether it asked clarifying questions, and how it approached the implementation.

Part 2: Using Codex

  1. Open a new terminal in the same directory (or reset changes first see Troubleshooting)
  2. Start Codex: codex
  3. Give Codex the same task
  4. Observe how Codex approaches the implementation
  5. Review and test the changes

Note any differences in approach, file exploration, or implementation strategy.

Success Criteria

  • Both tools are installed and authenticated
  • The --shout flag works correctly with both implementations
  • You can articulate at least one difference in how each tool approached the task

Reflection Questions

  • Exploration Which tool explored more of the codebase before making changes?
  • Clarification Did either tool ask clarifying questions, or did both proceed directly?
  • Implementation How did the implementations differ (if at all)?
  • Workflow Which workflow felt more natural for this type of task?

Troubleshooting

Ensure installation completed with claude --version. Run curl -fsSL https://claude.ai/install.sh | bash if needed.

Install with npm install -g @openai/codex or brew install codex.

Both tools require API keys or subscription authentication. Run /status in Claude Code or check Codex configuration.

To compare implementations fairly, reset changes between tools:

git checkout .
git clean -fd

On this page