← Back home
LESSON 033AI Development13 min

What are Cursor and Codex? AI coding tools that work with code, files, terminals and repositories

AI coding assistants can do more than autocomplete. Lesson 033 explains editor agents, repository context, terminal tools, diffs, approvals and why code review still matters.

Today’s analogya junior engineer sitting beside your repository who can read files, propose patches and run approved commands

Early coding assistants often felt like smarter autocomplete: you wrote a few characters and the tool suggested the rest of the line.

Modern AI coding products can operate at a larger scope. Depending on the product and mode, they may inspect several files, search a repository, propose patches, run commands or help work through an issue.

Tools such as Cursor and Codex are examples of this broader AI coding assistant / coding agent category.

The exact feature set changes over time, so the important part is understanding the architecture rather than memorizing a product screenshot.

The model needs repository context

If you ask “fix the login bug,” the model cannot solve the problem from that sentence alone.

It may need to inspect:

A coding tool therefore needs a way to select and provide useful repository context to the model.

This may involve search, file retrieval, code indexing or agentic exploration.

Editing code is a tool action

The language model generates a proposed change. The surrounding product applies that proposal through editing tools.

Good interfaces show a diff—the exact lines added, removed or changed—before or after applying the edit.

You should read the diff just as you would review code written by another developer.

Terminal access increases power and risk

A coding agent may be allowed to run tests, install packages, inspect Git status or execute scripts.

That makes it much more useful than a text-only assistant, but it also means the model can trigger real changes.

The agent concepts from Lesson 020 apply directly: tool permissions, confirmation boundaries and logs matter.

Git is the safety net

The Git concepts from Lesson 027 become extremely valuable with coding agents.

Before large edits:

If the agent makes a poor edit, version control gives you a clear path back.

AI coding tools can be confidently wrong

A model may invent an API, misunderstand a dependency, remove an important edge case or make a test pass for the wrong reason.

Code that compiles is not automatically correct. Code that passes one test is not automatically safe.

Review should include behavior, security, performance and maintainability where relevant.

Give the agent a good task boundary

“Improve the project” is vague.

“Fix the null handling in function X, add a regression test, do not change public API behavior, and show me the diff before running anything destructive” creates a much better working contract.

Clear tasks also make the result easier to review.

Different tools emphasize different workflows

Some products are centered around an IDE/editor. Others can work through a chat surface, terminal, cloud sandbox or repository task.

Do not assume two products with the same underlying model behave the same. The surrounding tools, context selection and permission model shape the experience.

One thing to remember

An AI coding tool combines a model with repository context and development tools; its usefulness comes from that whole system, not from code generation alone.

Lesson 034 steps back from products and compares major AI providers such as OpenAI, Google Gemini and xAI Grok without treating company name and model name as the same thing.

Primary sources

Analogies build intuition; use the original sources for formal definitions and technical detail.

  1. Cursor Documentation ↗
  2. Cursor Docs — Agent Overview ↗
  3. OpenAI Codex — GitHub Repository ↗
  4. OpenAI Help — Codex CLI Getting Started ↗
← Previous032What is LangChain? A framework for wiring models, tools, retrieval and application state together
Next →034OpenAI, Gemini and Grok: separate the company, product, model family and specific model
COMMUNITY

Comments

Questions, reactions and useful additions are welcome here.

0 / 1200