AI Agents for Lawyers

Tools

Claude Code for Lawyers: Should Non-Programmers Use a Coding Agent?

Claude Code is a terminal coding agent. When lawyers should use it for bulk document work and small tools, two worked examples with guardrails, safer routes.

By Dr. Niklas SchmidtUpdated 13 November 20269 min read
On this page
  1. The short answer, by who you are
  2. What a coding agent is, in lawyer's terms
  3. Why lawyers reach for it anyway
  4. Example one: triage a production set without touching the originals
  5. Example two: a clause table from 400 leases
  6. The guardrails that are not optional
  7. Data terms: the one place Claude offers zero retention
  8. If you would rather not open a terminal
  9. A first week that will not hurt

Most lawyers should not start with Claude Code, and a minority should not stop at anything else. It is a terminal program that reads, writes and runs code in a folder you open, following instructions in plain English. For three kinds of work, bulk processing of hundreds of documents, small internal tools and repeatable pipelines, it is the most capable thing a non-programmer can run, and under an Enterprise agreement it is the only Claude surface eligible for zero data retention. Which lawyer you are decides the answer.

The short answer, by who you are

You areShould you use Claude Code?Start instead with
Solo or small-firm lawyer who wants one automationNot yet. The habits matter more than the tool.Cowork on a copied folder, or a no-code intake workflow
Associate who keeps repeating the same 400-file taskYes, on copies, with the guardrails belowA single script you keep and reuse
In-house counsel with no budget and a Copilot licenceProbably, if IT permits local tools; see the Agent 365 notePower Automate for the plumbing, Claude Code for the parsing
Firm innovation or IT teamYes, under Enterprise with ZDR and Compliance API capture switched onA sandboxed machine and a written permissions policy
Anyone with a live matter folder and no backupNoMaking a copy

The Codex app for macOS, launched 2 February 2026, fills the same role on OpenAI's side; Claude Code reached $2.5bn in annualised revenue by February 2026 and by March accounted for roughly 10% of public GitHub commits, a reported 326,731 in one day (SerpSculpt). These are programmer numbers. What matters for lawyers is that the tool is mature, widely documented and not going away.

What a coding agent is, in lawyer's terms

A chat model answers. A coding agent acts on a file system. Claude Code's building blocks, as the Agent SDK exposes them, are a handful of primitives: read, write and edit files, run shell commands, spawn sub-agents, call MCP servers, and two settings that matter more than the rest, allowed_tools and permission_mode (Composio). The first lists what the agent may do at all; the second decides whether it asks before doing it. Leave the second on "ask" for anything that writes.

Two more concepts carry over from the rest of the Claude ecosystem. A CLAUDE.md file in the folder is a standing instruction the agent reads every time; the Claude for Legal plugins write their practice profile there after a cold-start interview, and the same plugins run in Claude Code as slash-command skills (GitHub). Skills themselves are folders with a SKILL.md and optional scripts and reference material, and they fire only when a prompt matches their trigger (Layer3 Labs). Opus 5, the default model on Max since 24 July 2026, "verifies its own work without being told to" and delegates to sub-agents more readily than its predecessors (Anthropic), which is useful and also means it will do more than you asked if you do not fence it.

Why lawyers reach for it anyway

The honest case for Claude Code comes from lawyers who tried the alternatives first. In March 2026 a former deputy general counsel described weeks of failure building a requirements-extraction engine in n8n, then wrote that he "rebuilt it in a day using Claude Code. 521 requirements extracted." One reply: "Our firm was able to replace Harvey and Ironclad with Claude code." Another, from the other side of the room: "shadow AI chaos with no governance, no consistency, and no audit trail" (r/legaltech, 5 March 2026). All three are accurate, and the guardrails section exists because of the third.

A small-firm US lawyer, Zack Shapiro, published his hand-built Claude Skills that edit Word XML directly to produce tracked changes and fix brief citations; the post drew 7 million views and a week of argument about whether general models plus skills beat purpose-built legal tools (Artificial Lawyer, 2 March 2026). At Clifford Chance, senior associate Jamie Tso built a track-changes analyser, a side-letter tabulator and a signature-page extractor for roughly nothing, and set four rules worth copying: pick one daily pain point, write the spec as a user experience before asking for code, never upload client data, and iterate with screenshots (Tso, January 2026). At Linklaters a managing associate's Narrative Checker cleans roughly 1,000 time-recording narratives a minute and was used 300+ times across 13 offices in its first week (Non-Billable).

The pattern in all of these is the same. The tool was not a chatbot. It was a script or a small app that did one bounded thing to many files, built by the person who understood the files. The vibe coding glossary entry and the build-or-buy guide place this against the $500m platforms; McKinsey's 2026 survey found 38% of professional-services firms now forgo software purchases to build in-house.

Example one: triage a production set without touching the originals

The job: a client has sent 1,200 PDFs from a mailbox export. You need them renamed by date and sender, an index, and a list of pages that contain bank account numbers or dates of birth so they can be redacted in your review platform before production. Claude Code should find and list; it should not be the tool that performs the final redaction, because a scripted redaction on a text layer can leave the image untouched.

  1. Copy the 1,200 files to ~/cc-work/2026-0512-prod/in/. Leave the originals in the DMS.
  2. In that folder run git init and commit. This is your rollback.
  3. Create CLAUDE.md with the limits (below).
  4. Start Claude Code in ask-before-write mode and paste the task.
  5. Approve the dry-run table, then the script, then the run.
  6. Spot-check 30 files against the table before anyone relies on it.
Task: process the PDFs in /in. Write nothing outside /out and /log.

Step 1 (dry run, no changes): for every file, extract the date of the
email or letter, the sender and a 4-word description. Output
/out/rename-plan.csv with columns: original, proposed_name, date_source
(header | body | inferred), confidence. Proposed name format:
YYYY-MM-DD_sender_description.pdf. STOP and wait for my approval.

Step 2 (after approval): copy each file to /out using the proposed
name. Never delete or overwrite. If a name collides, append -2.

Step 3: for every page, flag candidate bank account numbers (IBAN or
8-digit UK account with sort code) and dates of birth. Write
/out/pii-candidates.csv: file, page, type, snippet (max 20 chars),
confidence. Do not modify any PDF.

Step 4: write /out/index.docx listing file, date, sender, pages.
Step 5: write /log/run.md with every command you ran and every file
you could not read. Show me each script before running it.

The dry run is the control. A rename plan you can read in Excel is far easier to verify than a folder that has already been renamed. The PDF extraction playbook covers the OCR step to run first when the scans are poor; for high-stakes work run Tesseract or a commercial OCR pass and feed text, since models read scans by vision and Claude is more likely to say "illegible" than to invent a number, but not guaranteed to.

Example two: a clause table from 400 leases

The job: a portfolio acquisition, 400 leases, a table of term, break rights, rent review, assignment and change-of-control positions, each cell cited to the lease and clause. This is what Legora's Tabular Review and the corporate-legal plugin's "every cell cited" diligence grid sell; on Claude Code it is a script plus a rubric.

Read /leases (PDF, already OCR'd). For each lease produce one row in
/out/lease-grid.csv: file, tenant, premises, term_start, term_end,
break_right (Y/N + clause), break_conditions, rent_review_type,
rent_review_dates, assignment_position (consent | absolute bar |
permitted intra-group | other), change_of_control (clause or NONE),
confidence (H/M/L), notes.
Rules: quote the clause number for every populated cell. If a term is
absent write NONE, never guess. If the document is not a lease, write
NOT A LEASE and move on. Process in batches of 25 and write the CSV
after each batch so a crash loses nothing. Do not summarise risk.
When finished, list the 20 rows with the lowest confidence.

A sample of the output is what you check, not the whole table:

filebreak_rightrent_review_typeassignment_positionchange_of_controlconfidence
L-0031_Unit4.pdfY, cl. 9.2Open market, cl. 7Consent, cl. 15.1cl. 15.4H
L-0032_Unit5.pdfNFixed uplift, cl. 7.3Absolute bar, cl. 15NONEH
L-0187_Retail.pdfY, cl. 8NONEConsent, cl. 14NONEL

Check every row marked L, and 10% of the rest. If the error rate in the sample exceeds what a paralegal would produce, fix the rubric, not the model. The due diligence use case has the numbers firms are reporting for this shape of task, including GSK Stockmann's 15–20% saving on standard diligence.

The guardrails that are not optional

  • Copies only. The agent never sees a DMS sync folder, a desktop or an original.
  • Snapshot before every run. git init and a commit cost ten seconds and give you a full undo.
  • Ask-before-write stays on. Turn it off for read-only analysis only.
  • Dry run first, always. A plan table you approve, then the action.
  • No deletion, ever. Write it in CLAUDE.md. The February 2026 Cowork incident, in which an approved clean-up ran rm -rf on fifteen years of photographs, is the reason.
  • Show the script. You do not need to read Python; you need to see that it opens /in and writes to /out.
  • Log every run. A run.md with commands and unreadable files is your audit trail, and it is what answers the "shadow AI" objection.
  • Synthetic data on personal plans. Client documents only under Team or Enterprise terms.

The agent security guide explains why instructions to an agent are not access controls. Grok Build proved it in July 2026: its CLI uploaded entire repositories and an unredacted .env secrets file, 5.10 GiB against roughly 192 KB the model used, and the privacy toggle did nothing; the same wire-level analysis found Claude Code and Codex sent no such bundles (The Hacker News). Vendor behaviour differs, and only the network traffic tells you which.

Data terms: the one place Claude offers zero retention

As of September 2026, Anthropic's retention rules make Claude Code the odd one out in a useful way. API and Claude Code content is not retained by default; Claude Team and Enterprise chat interfaces are not eligible for zero data retention, but Claude Code under an Enterprise agreement is (Anthropic). Two exceptions cut the other way: the Covered Models (Fable 5 and 5.1) require 30-day retention and are not ZDR-eligible without express authorisation, so a ZDR pipeline runs on Opus 5 or Sonnet 5; and flagged content can be kept up to two years. The ZDR glossary entry explains what the term does and does not promise.

Governance has caught up in two places. Anthropic's Compliance API has returned local Claude Code session transcripts since 11 August 2026, retained six years by default, provided capture was enabled before the activity (Anthropic). And Microsoft Agent 365, generally available since 1 May 2026 at $15 per user per month or within M365 E7, detects local agents on managed devices, naming "OpenClaw, GitHub Copilot CLI, Claude Code" (Microsoft Security). If your firm runs it, IT already knows you installed the tool. Better that they approved it.

If you would rather not open a terminal

JobNo-code routeWhat you give up
Work on one folder of documentsCowork with an instructions fileRepeatability; the same task next month is a new conversation
A matter knowledge baseClaude ProjectsNothing, for Q&A; it cannot process files in bulk
Intake, reminders, digestsn8n, Make or ZapierCustom parsing logic; fine for plumbing
A client-facing calculator or intake appLovable, Claude Artifacts, v0Local file access; see the intake app playbook
A 400-lease grid, onceLegora, Harvey, the corporate plugin in CoworkNothing, if you have the seats

Cowork is the right first stop for almost everyone, and the point at which it stops being enough is easy to recognise: you are running the same folder task for the third time, or the folder has passed a few hundred files.

A first week that will not hurt

Day one, install it on a machine that holds no client data and run the two examples above on synthetic documents; Module 5 of the AI Lab for Lawyers course covers this kind of lawyer-built tooling and Module 4 the no-code alternatives, which is the right order to learn them in. Day two, write your own CLAUDE.md with the eight guardrails. Day three, pick the one repetitive task you did last month that touched more than fifty files, and rebuild it as a dry run. Day four, show the log to whoever owns AI governance in your firm and ask for a sanctioned setup, ideally Enterprise with zero retention. Day five, decide whether the checking time was shorter than the doing time. If it was, you have a pipeline. If it was not, you have learned in a week what a platform pilot takes six to teach.

Frequently asked questions

Can a lawyer with no coding experience use Claude Code?

Yes, because you write instructions in English and the agent writes and runs the code. The hurdle is not syntax but habits: working in a terminal, keeping copies, reading what the agent proposes before approving it and checking output on a sample. Lawyers who already use Cowork or Claude Projects comfortably usually manage a first useful script in an afternoon.

What is the difference between Claude Code and Claude Cowork?

Cowork runs inside the Claude desktop app and works on a folder you designate with a visual interface and approval prompts. Claude Code runs in a terminal, can reach any directory you open, writes and executes real scripts and is built for repeatable pipelines and tools. Cowork is the safer first step; Claude Code is for bulk and repeatable work, and it is the surface that can run under zero data retention on Enterprise.

Is Claude Code safe for confidential client documents?

Under an Enterprise agreement with zero data retention arranged, it is one of the safer options Anthropic offers, because Claude Code under Enterprise is ZDR-eligible while the Team and Enterprise chat interfaces are not. On a personal Pro or Max plan, use only synthetic or anonymised documents, keep training turned off and never let the tool near a live matter folder.

Is Codex the same thing as Claude Code?

Codex is OpenAI's equivalent coding agent, available as a macOS app since February 2026 and in the terminal. Both read and write files, run code and follow written instructions. The workflow described here works in either; the data terms differ, so check OpenAI's Business or Enterprise retention terms in the same way you would check Anthropic's before uploading anything sensitive.

Put this into practice

AI Lab for Lawyers: a live, hands-on course for practising lawyers

4 live sessions (8 hours), recordings included, taught by Dr. Niklas Schmidt of Wolf Theiss. Rated 4.7/5 from 381 ratings; alumni from Norton Rose Fulbright, Paul Hastings, Pillsbury and Taylor Wessing.

Reserve a seat · €200 Maven money-back guarantee · certificate of completion