<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/hands-on-rebuilding-claude-code-s-harness-hkopcmtsp" -->

---
title: [Hands-on] Rebuilding Claude Code&#x27;s Harness | daily.dev
description: A hands-on walkthrough of rebuilding Claude Code&#x27;s agent harness using CrewAI, an open-source orchestration framework. The post explains that Claude Code&#x27;s...
canonical: https://daily.dev/posts/hands-on-rebuilding-claude-code-s-harness-hkopcmtsp
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: [Hands-on] Rebuilding Claude Code&#x27;s Harness | daily.dev
og:description: A hands-on walkthrough of rebuilding Claude Code&#x27;s agent harness using CrewAI, an open-source orchestration framework. The post explains that Claude Code&#x27;s...
og:url: https://daily.dev/posts/hands-on-rebuilding-claude-code-s-harness-hkopcmtsp
og:image: https://api.daily.dev/og/posts/hKOPCmtsp.png
og:image:alt: [Hands-on] Rebuilding Claude Code&#x27;s Harness
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# [Hands-on] Rebuilding Claude Code's Harness

**[Daily Dose of Data Science \| Avi Chawla \| Substack](https://daily.dev/sources/dailydoseofds)** · 14 min read · 0 upvotes · 0 comments

## Summary

A hands-on walkthrough of rebuilding Claude Code's agent harness using CrewAI, an open-source orchestration framework. The post explains that Claude Code's advantage lies not in the model itself but in the surrounding machinery: the agent loop, planning, subagent delegation, sandboxing (via E2B), human-in-the-loop approvals, and persistent memory with checkpointing. Each layer is mapped to a corresponding CrewAI feature with working code examples, culminating in a full multi-agent setup that fixes bugs in a BankAccount codebase. The post also notes what the framework doesn't handle — prompt engineering, execution environment setup, and tool assignment — and acknowledges that some scaffolding may become obsolete as models improve.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.dailydoseofds.com/p/hands-on-rebuilding-claude-codes>

## Questions this post answers

### What makes Claude Code better than a basic custom-built coding agent using the same model?

The difference lies in the harness, not the model. Claude Code wraps the core agent loop with planning, subagent delegation, a sandbox, a permission and approval system, and persistent memory, while a bare thirty-line loop reads wrong files, loses the goal midway, and fills its context with unneeded output on the same task.

_Developers weighing custom agent builds against Claude Code can track these architecture breakdowns on daily.dev._

### How do you build a multi-agent coding harness with subagents and a sandbox using CrewAI?

Use CrewAI's hierarchical process with a manager agent that has allow_delegation=True overseeing specialist agents like a Codebase Explorer, Software Engineer, and Test Runner. Add planning=True for a task roadmap, memory=True for cross-run recall, checkpoint=True for resumability, and E2BExecTool/E2BPythonTool to run shell commands and code inside an isolated per-session VM instead of the host machine.

_Engineers assembling agent harnesses can follow along with CrewAI configuration examples on daily.dev._

### Why did Anthropic remove the context reset workaround from Claude's coding harness?

Anthropic originally used context resets to stop Claude Sonnet 4.5 from ending tasks too early, but the workaround was no longer needed once the more capable Claude Opus 4.5 shipped. This illustrates that harness scaffolding is often a patch for a given model's limitations rather than a permanent architectural requirement.

_Anyone tracking how model upgrades reshape agent scaffolding needs can follow these shifts on daily.dev._

## Similar posts on daily.dev

- [What Is an Agent Harness? The Architecture Behind Claude Code, DeepSeek Harness, and Hermes Agent](https://daily.dev/posts/what-is-an-agent-harness-the-architecture-behind-claude-code-deepseek-harness-and-hermes-agent-yewiwnntj) · freeCodeCamp · 12 upvotes · 2 comments
- [Program Claude Code, Codex, Pi and other agent harnesses with AI SDK](https://daily.dev/posts/program-claude-code-codex-pi-and-other-agent-harnesses-with-ai-sdk-o7afpazbb) · Vercel · 2 upvotes · 0 comments
- [Welcome to Learn Harness Engineering](https://daily.dev/posts/welcome-to-learn-harness-engineering-p7orheybq) · Hacker News · 0 upvotes · 0 comments
- [Claude Code as an Autonomous Agent: Advanced Workflows \(2026\)](https://daily.dev/posts/claude-code-as-an-autonomous-agent-advanced-workflows-2026--4gjoc6yvx) · SitePoint · 1 upvotes · 0 comments

---

Tags: [#llm](https://daily.dev/tags/llm), [#ai-agents](https://daily.dev/tags/ai-agents), [#claude-code](https://daily.dev/tags/claude-code)

[View this post on daily.dev](https://daily.dev/posts/hands-on-rebuilding-claude-code-s-harness-hkopcmtsp)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"[Hands-on] Rebuilding Claude Code's Harness","url":"https://daily.dev/posts/hands-on-rebuilding-claude-code-s-harness-hkopcmtsp","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/hands-on-rebuilding-claude-code-s-harness-hkopcmtsp"},"datePublished":"2026-07-19T18:50:35.154Z","dateModified":"2026-09-14T08:16:31.518Z","description":"A hands-on walkthrough of rebuilding Claude Code's agent harness using CrewAI, an open-source orchestration framework. The post explains that Claude Code's...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/212c83118c94ca2040f9f17b40db4cac?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/212c83118c94ca2040f9f17b40db4cac?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Daily Dose of Data Science | Avi Chawla | Substack","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Daily Dose of Data Science | Avi Chawla | Substack","logo":"https://media.daily.dev/image/upload/s--4IHQgTOw--/f_auto/v1710503712/logos/dailydoseofds","url":"https://daily.dev/sources/dailydoseofds"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/hands-on-rebuilding-claude-code-s-harness-hkopcmtsp","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"llm,ai-agents,claude-code","timeRequired":"PT14M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Daily Dose of Data Science | Avi Chawla | Substack","item":"https://daily.dev/sources/dailydoseofds"},{"@type":"ListItem","position":3,"name":"[Hands-on] Rebuilding Claude Code's Harness"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/hands-on-rebuilding-claude-code-s-harness-hkopcmtsp#faq","mainEntity":[{"@type":"Question","name":"What makes Claude Code better than a basic custom-built coding agent using the same model?","acceptedAnswer":{"@type":"Answer","text":"The difference lies in the harness, not the model. Claude Code wraps the core agent loop with planning, subagent delegation, a sandbox, a permission and approval system, and persistent memory, while a bare thirty-line loop reads wrong files, loses the goal midway, and fills its context with unneeded output on the same task. Developers weighing custom agent builds against Claude Code can track these architecture breakdowns on daily.dev."}},{"@type":"Question","name":"How do you build a multi-agent coding harness with subagents and a sandbox using CrewAI?","acceptedAnswer":{"@type":"Answer","text":"Use CrewAI's hierarchical process with a manager agent that has allow_delegation=True overseeing specialist agents like a Codebase Explorer, Software Engineer, and Test Runner. Add planning=True for a task roadmap, memory=True for cross-run recall, checkpoint=True for resumability, and E2BExecTool/E2BPythonTool to run shell commands and code inside an isolated per-session VM instead of the host machine. Engineers assembling agent harnesses can follow along with CrewAI configuration examples on daily.dev."}},{"@type":"Question","name":"Why did Anthropic remove the context reset workaround from Claude's coding harness?","acceptedAnswer":{"@type":"Answer","text":"Anthropic originally used context resets to stop Claude Sonnet 4.5 from ending tasks too early, but the workaround was no longer needed once the more capable Claude Opus 4.5 shipped. This illustrates that harness scaffolding is often a patch for a given model's limitations rather than a permanent architectural requirement. Anyone tracking how model upgrades reshape agent scaffolding needs can follow these shifts on daily.dev."}}]}
```

