Model or dataset
shareAI-lab/learn-claude-code avatar
shareAI-lab/learn-claude-code

learn-claude-code: A Nano Agent Harness That Teaches the Vehicle, Not the Driver

Hands-on tutorial that builds a minimal Claude Code–style agent harness from scratch around Bash, teaching how model and harness combine into a working agent product.

76,864 stars12,356 forksPythonMIT

At a glance

What is it?
This repository builds a minimal, Claude Code-like harness in Python to show where agency really lives: in the model, not the orchestration code. It is a teaching tool for engineers who want to build their own agent infrastructure.
Who is it for?
Adopt learn-claude-code if you are a developer who wants to understand harness engineering by reading and modifying a small, MIT-licensed codebase. Skip it if you need a production-ready agent with tool ecosystem, sandboxing, or long-term support.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 20 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The Core Argument: Agency Is Trained, Not Coded

The README opens with a strong claim: agency, the capacity to perceive, reason, and act, comes from model training, not from external code orchestration. It backs this with historical milestones: DeepMind DQN in 2013, OpenAI Five in 2019, AlphaStar in 2019, and Tencent Jueyu in 2019. The point is that every successful agent is a trained model placed in an environment with tools. The repository then draws a line between two meanings of 'building an agent': training a model, which is gradient-based, and building a harness, which is the code that gives a model an operational environment. This project is firmly in the second camp. The README is blunt about what it is not: it dismisses drag-and-drop workflow builders and prompt-chain orchestration libraries as 'Rube Goldberg machines' with an LLM wedged in as a text-completion node. That is a useful framing for engineers who have been sold on visual agent builders. The repository wants you to understand that the model is the driver and the harness is the vehicle.

What a Harness Actually Contains

The README defines a harness as five components: Tools, Knowledge, Observation, Action Interfaces, and Permissions. Tools are file I/O, shell, network, database, browser. Knowledge includes product docs, API specs, style guides. Observation covers git diff, error logs, browser state. Action interfaces are CLI commands, API calls, UI interactions. Permissions are sandbox isolation, approval workflows, trust boundaries. This decomposition is the intellectual core of the project. It tells you exactly what code you need to write if you want to build your own agent environment. The README also describes what harness engineers do: implement tools that are atomic and composable, curate knowledge loaded on demand, manage context with subagents and compaction, and control permissions. That list reads like a job description for the project itself. The repository is not just a code dump; it is a curriculum in the form of a codebase.

The Nano Harness: A Python Implementation

The project is described as a 'nano claude code-like agent harness' built from 0 to 1 in Python. The primary language is Python, and the license is MIT. The README does not provide a full file listing, but the description suggests a minimal implementation that mirrors Claude Code's structure: a model loop, tool definitions, and a permission system. The phrase 'built from 0 to 1' implies the code is written from scratch rather than wrapping an existing agent framework. That is both a strength and a risk. A from-scratch implementation is easier to read and modify, but it may lack the battle-tested edge cases of a mature library. The README's emphasis on 'atomic, composable, clearly described' tools gives a hint about the design aesthetic: small functions with clear inputs and outputs, not monolithic classes. If you are the kind of engineer who learns by reading source code, this repository is probably a good fit.

Getting It Running: Commands and Configuration

The README does not include explicit installation commands, which is a notable gap. There are no pip install instructions, no environment variable setup, and no CLI invocation examples in the README. The homepage is https://learn.shareai.run, which may contain more details, but I cannot confirm that from the README. What is clear is that the project is Python-based, so a typical workflow would involve cloning the repository, creating a virtual environment, and installing dependencies from a requirements file, but none of that is documented in the excerpt. The README does mention a permission system, which implies configuration for approval workflows and sandbox isolation, but again, no concrete config keys are given. This lack of setup documentation is a real limitation for a teaching project. A learner who wants to run the harness must either dig into the code or visit the homepage. The repository would benefit from a quickstart section.

Where It Falls Short: No Releases, No Maintenance Signal

The repository metadata is thin. The last push date is unknown, and there are no recent releases retrieved. That makes it hard to judge whether the project is actively maintained. The README is polished and argues its thesis well, but a teaching repository that goes stale can teach outdated patterns. Another limitation is the scope: it is a 'nano' harness, so it will not have the full tool ecosystem of Claude Code, such as built-in file editors, git integrations, or browser automation. The README lists those as categories, but a nano implementation likely covers only a subset. If you need to run real coding tasks at scale, this project is probably the wrong tool. It is a learning artifact, not a production system. The README is also opinionated, which is good for teaching but may alienate engineers who prefer a more neutral tone. The lack of a documented upgrade path or versioning scheme adds to the uncertainty.

Alternatives: Claude Code and the Harness Design Space

The most obvious alternative is Claude Code itself, the commercial product that this project mimics. Claude Code is a full-featured agent harness with a large tool set, sandboxing, and Anthropic's model integration. The difference in approach is that Claude Code is a product you use, while learn-claude-code is a codebase you read and modify. If you want to build your own harness, you could also look at open-source agent frameworks like LangChain or AutoGPT, but the README explicitly rejects those as 'prompt-chain orchestration libraries' that do not constitute real agents. The project's stance is that a harness should be minimal and close to the model, not a layer of procedural glue. For a different teaching approach, consider reading the source code of Claude Code's open-source alternatives, but that is a different path. The real alternative is to write your own harness from scratch, which is exactly what this repository teaches you to do.

Maintenance and License Implications

The license is MIT, which means you can freely use, copy, modify, and distribute the code, including in commercial projects, as long as you preserve the copyright notice. That is a permissive license, so there are few restrictions on adoption. However, the maintenance situation is unclear. With no recent releases and an unknown last push date, you should treat this as a snapshot rather than a living project. If you adopt it as a base for your own harness, you are on your own for updates and bug fixes. The README is the main documentation, and it is more philosophical than technical. That is fine for learning, but not for operational use. The project's homepage may have more, but the repository itself does not show a changelog or release notes. For a teaching tool, this is acceptable, but for a dependency, it is a risk. You should verify the current state of the repository before committing to it.

Editorial conclusion

Adopt learn-claude-code if you are a developer who wants to understand harness engineering by reading and modifying a small, MIT-licensed codebase. Skip it if you need a production-ready agent with tool ecosystem, sandboxing, or long-term support. Before using it, verify the current state of the repository, since no recent releases were retrieved and the last push date is unknown. Check the README for the exact tool list and permission model, and be prepared to write your own integration code for real workflows.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
Community notes

Community notes