AI Development

AI Coding Agents Are Changing Software Development: How Claude Code and GPT Agent Call Tools and Run Code via JSON

About 15 min read

Software development in 2026 looks less like typing completions in an IDE. Claude Code reads the repo, edits files, and runs tests in your terminal; GPT Agent / Codex opens a sandbox, writes a patch, and returns a result. The shells differ. The skeleton does not: the model only fills JSON; the host executes. This piece opens that call chain—and how it rewrites a normal workday.

At a glance

Idea One line Lands on
Coding Agent A runtime that can read a repo, edit files, and run commands Agent loop
Claude Code A local coding agent in the terminal tool_use JSON
GPT Agent Coding and computer use in a session / sandbox tool_calls / code
JSON The contract for names, arguments, and results Schema / payload

Remember the split: the model fills objects, the host executes, the loop makes patches and tests continuous. Swap the brand; the JSON call chain stays.

A Coding Agent is not a chat box that writes code

A completion model fills the next line. A chat model explains a function. A Coding Agent is a third thing: a runtime that puts the model in a loop—observe repo state, propose the next step, call an external tool, digest the result, then continue, stop, or hand off.

A shippable Coding Agent in 2026 is usually a trio:

  • The model: it only emits text or a structured object. It does not touch disk.
  • A tool catalog: read, edit, run, search; sometimes a browser or MCP.
  • The host: parse JSON, enforce gates, actually execute, write the result into the next turn.

If you still collapse Agent, Tool Calling, and Function Calling into one word, start with AI Agent complete guide. This article covers one product shape: a Coding Agent that works against a real repository.

What changed is the loop, not the editor

For a decade, IDE completion shortened typing. For two years, chat windows brought defects closer. A Coding Agent changes a third thing: who writes the first runnable patch.

A typical day is no longer “humans finish, then CI checks.” More often:

  1. A human writes intent: fix this failing test, or add a field to this API.
  2. The agent runs the loop: read the repo, search symbols, edit files, run tests, leave a trail of tool calls.
  3. Humans review the diff and the trail: not every keystroke, but types, tests, and permissions still matter.

This is not “AI does your job.” The first draft now comes from a loop; humans gate shape and side effects. Capture tools and workflows as Schema—see JSON Schema and AI Agent workflows.

The loop does one job: fill JSON, then read JSON

Product pages say “writes code autonomously.” In engineering, one turn is usually four hops:

  1. Observe: workspace, test output, and the last tool result enter context.
  2. Propose: the model emits a tool name and an argument object—it does not open() the file.
  3. Execute: the host validates, runs a command, or edits a file. Side effects happen here.
  4. Write back: stdout, the patch, and the exit code become the next visible object.

Skip a gate and JSON is a command. Keep all four hops and you have a replayable session. Why AI needs JSON Schema already said it: Schema is the contract, not “please return JSON” in a prompt.

Claude Code: a tool surface in the terminal

Claude Code is Anthropic’s local Coding Agent: it runs in your terminal against the current repo. On the model side it uses Messages API content blocks. What you see every day is a stream of tool_use.

The default tool surface is narrow—and that narrowness is what makes review possible:

  • Read / Glob / Grep: look first, then edit.
  • Edit / Write: change the repo by exact replace or whole-file write.
  • Bash: run tests, install deps, execute scripts.
  • MCP: fold external systems into the same JSON tool table. Details in MCP Tool Schema vs Function Calling.

The model does not send a paragraph that says “please edit this file.” It sends a validatable object:

{
  "type": "tool_use",
  "id": "call_read_1",
  "name": "Read",
  "input": {
    "path": "src/billing/refund.py"
  }
}

After the host finishes, it writes an object back. stdout can be long; the entry is still tool_result, not a chat bubble:

{
  "type": "tool_result",
  "tool_use_id": "call_bash_4",
  "content": {
    "stdout": "12 passed, 1 failed",
    "exit_code": 1
  }
}

Auto-mode and confirm gates decide whether this hop waits for a human. Turn the gates off and the loop will finish Bash on its own—that is why development got faster, and why the blast radius grew. For the security surface see Claude incidents and tool JSON and AI Agent security and JSON validation.

GPT Agent: sessions, sandboxes, and Function Calling

OpenAI’s side has more names: ChatGPT Agent, Codex, Responses API, GPT-6 Astra. The shells differ; the call shape is still Function Calling: declare tools[], propose tool_calls, put a stringified object in arguments.

A coding-related call looks like this:

{
  "tool_calls": [{
    "id": "call_7f2a",
    "type": "function",
    "function": {
      "name": "run_code",
      "arguments": "{\"language\":\"python\",\"code\":\"from pathlib import Path\\nprint(Path('src').exists())\"}"
    }
  }]
}

The difference from Claude is not “can it write code.” It is how the tool surface is assembled:

  • Code interpreter / sandbox: fold multi-step compute into one run_code or python call to cut round-trips.
  • Computer use: browser and desktop actions are another set of structured moves.
  • Codex / CLI: closer to a repo-level Coding Agent; the table becomes read, edit, run again.

GPT-6 Astra guide already named the same discipline: finish “choose tool → call tool → return an object” more reliably. For developers that means patches and test output should be reconstructible from a JSON trail—not from a sentence that says “I already fixed it.”

Where does the code actually run? Not inside the model

This is the sentence people get wrong. A large model does not execute Python and does not spawn a process. It only emits:

  • A tool name: Bash, Read, python, apply_patch.
  • An argument object: command, path, old_string, code.
  • Sometimes patch text: still a field first, then the host writes it to disk.

What actually runs code is the host: a local process, a container, or a cloud sandbox. Filesystem and network permissions belong to host policy, not model weights. A tightened tool Schema looks like this:

{
  "name": "Bash",
  "description": "Run a shell command in the workspace",
  "inputSchema": {
    "type": "object",
    "properties": {
      "command": { "type": "string" },
      "timeout_ms": { "type": "integer", "maximum": 120000 }
    },
    "required": ["command"],
    "additionalProperties": false
  }
}

additionalProperties: false is not pedantry. A wide object lets the model sneak in a target host or an extra script. Secrets, cookies, and internal bases stay on the host. They do not enter the argument object.

Claude Code vs GPT Agent: you are not buying the same shell

Not smarter/dumber—where you hang the loop:

Dimension Claude Code GPT Agent / Codex
Entry Local terminal, against the repo Session, sandbox, or CLI
Call shape tool_use / tool_result tools[] / tool_calls
Default tools Read, Edit, Bash, Grep, MCP Functions, code interpreter, computer use
Execution world Your machine or the sandbox you mount Vendor sandbox or local Codex
What you maintain Permission gates, MCP, session trail Tool Schema, Responses trail

Swap the brand; the loop stays. Stabilize the tool contract and the execution world, not a chat skin. DeepSeek turned the host into replaceable infrastructure—see DeepSeek Harness and coding-agent infrastructure.

Inspect the trail, not the bubble

After an agent writes code, review it the way you review a teammate’s PR: diff, tests, permissions. The extra layer is the tool trail.

  • format the tool_use / tool_calls and check that the name and arguments are the hop you thought.
  • Use JSONPath extract to pull name, command, and path. Do not scan prose by eye.
  • JSON Diff against last week’s green trail. If the loop drifted, inspect the tool table and argument shape before blaming the model.
  • Failing-test stdout belongs in the trail. “I fixed it” is not a record.
  • Do not paste production secrets, customer dumps, or internal URLs into a public formatter. JSONSort runs in the browser with zero upload—fit for these objects.

If the trail can be rebuilt, the session can be reviewed. That is the price of putting a Coding Agent into a team workflow, not a nice-to-have.

Pitfalls

  • Treating a Coding Agent as smarter autocomplete. Autocomplete edits a line; an agent edits the loop.
  • Believing the model executed the code. Execution sits on the host.
  • Reviewing only the file diff, not the tool JSON. The command may already have run.
  • Giving Bash a blank check. No cwd, timeout, or network gate, and the loop is a production incident.
  • Replacing Schema with a prompt. A contract must be validatable.
  • Storing the session as chat bubbles. Without tool_result, there is no replayable development record.

FAQ

Which is a better fit for a team: Claude Code or GPT Agent?

Look at the execution world. If the repo is on your machine and you need MCP plus local tests, Claude Code or Codex CLI is closer. If you want in-session sandbox compute or computer use, take GPT Agent / Responses. Lock the tool Schema first, then pick a shell.

Can the model secretly run a command I did not approve?

The model can only propose. Whether it runs depends on confirm gates, an allowlist, and network isolation on the host. Auto-mode means you pre-approved a class of JSON.

How is this different from ordinary Function Calling?

Same shape, different radius. A support lookup is usually read-only. A Coding Agent’s tools can mutate disk and spawn processes. Schema, timeouts, and audit have to be tighter.

Why insist on JSON instead of a better prompt?

Side effects happen after the object is parsed. A prompt influences what the model fills; Schema and the host decide what may run. When debugging, objects beat adjectives.

Should the agent push to production?

No. Let it open a branch, run tests, and leave a trail. Merge and release stay human strategic gates. The loop drafts; the gate ships.

Conclusion

AI Coding Agents change software development not by making the editor better at guessing the next line, but by making “read the repo → fill tool JSON → host executes → write the result back” the default loop. Claude Code and GPT Agent are two shells.

From today, argue less about which model writes better code. Put the tool Schema, the execution world, and the session trail in the repo first. Models turn over; this JSON call chain should stabilize first.

Further reading

Changelog: First published