frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Claude Code Open Source?

1•ryanthedev•1h ago
Today I learned that they ship the entire CLI with the agent SDK. It's all there...

Do we think this was a mistake? ----

node_modules/@anthropic-ai/claude-agent-sdk/cli.js.

  It's the bundled, minified CLI binary for Claude Code itself (the tool you're talking to right now).

  Key details:
  - Version: 2.1.71, built on 2026-03-06
  - ~13,800 lines of heavily minified/bundled JavaScript
  - Shebang: #!/usr/bin/env node — it's meant to be run as a CLI executable
  - Copyright: Anthropic PBC, with a cheeky note: "Want to see the unminified source? We're hiring!"
  - What it contains: The entire Claude Code CLI application bundled into a single file, including:
    - Onboarding/setup screens
    - Policy/managed settings loading
    - Debugging/inspector detection
    - UI rendering (using Ink/React for terminal UI)
    - Prefetching logic
    - Error handling and exit codes
    - The main entry point (main function) that starts the interactive Claude Code session

  Essentially, when you run claude in your terminal, this is the file that executes. The @anthropic-ai/claude-agent-sdk package ships it so you can
  programmatically invoke Claude Code's capabilities — the SDK wraps this CLI as its underlying engine.
--- Yes, the agent loop is in there. Here's what I can see from the minified code:

  1. i6z function — This is the in-process agent runner, which logs "Starting agent loop for ${agentId}". It sets up agent identity (agentId,
  parentSessionId, agentName, teamName, color, planMode) and runs the loop.
  2. l6z function — A poll loop for in-process teammate agents. It continuously checks for:
    - Pending user messages
    - Mailbox messages from other agents
    - Shutdown requests
    - New tasks from the task list
  3. Main loop model orchestration — There's extensive logic around mainLoopModel that handles:
    - Model selection based on permission mode (plan mode uses Opus, etc.)
    - System prompt assembly (tools, MCP instructions, skills, memory, changed files)
    - Token usage tracking and budget management
    - Compaction (context window management when conversations get long)
  4. Multi-agent coordination — The loop supports a team-based agent architecture with messaging between agents (agentName, teamName, teamLead, mailboxes,
  shutdown requests).

  So yes — the full agentic loop (prompt → LLM call → tool execution → repeat) is bundled in this file, just heavily minified. It's the same loop powering
  this conversation right now.
--- Full system prompts are right there in the bundle as plain text strings. Here's what's embedded:

  Three identity variants:

  - F78 — CLI mode: "You are Claude Code, Anthropic's official CLI for Claude."
  - EtA — SDK mode: "You are Claude Code, Anthropic's official CLI for Claude, running within the Claude Agent SDK."
  - LtA — Agent mode: "You are a Claude agent, built on Anthropic's Claude Agent SDK."

  Full system prompt sections (line ~6213-6217):

  The ULz function assembles the complete system prompt, including all the sections you'd recognize:

  - "# Doing tasks" — instructions about software engineering, not proposing changes to unread code, avoiding over-engineering, OWASP security, etc.
  - Over-engineering rules — "Don't add features beyond what was asked", "Don't add error handling for scenarios that can't happen", "Don't create helpers
  for one-time operations"
  - Help/feedback info — links to GitHub issues
  - Tool usage instructions — Read vs cat, Edit vs sed, etc.

  Output style variants (line ~6517):

  Built-in output styles like Explanatory and Learning with their own prompt overlays.

  Also present:

  - The classifier/safety prompt (~line 2844) for security-relevant harm prevention
  - Subagent instructions like "You ARE the fork. Do NOT spawn sub-agents"
  - Git commit/PR workflow prompts
  - Memory system instructions

Manifesto for Restorative Justice and Human Rights

https://www.euforumrj.org/manifesto-restorative-justice-and-human-rights
1•rendx•45s ago•0 comments

My Claude Code Toolkit

https://newartisans.com/2026/02/my-claude-code-toolkit/
1•simonmic•1m ago•0 comments

Cereggii: Thread Synchronization Utilities for Python

https://github.com/dpdani/cereggii
1•PaulHoule•4m ago•0 comments

New to Engineering and Feeling of Responsibility

1•BobCatJamesDean•5m ago•0 comments

The Monobloc: the best-selling chair

https://www.domusweb.it/en/design/2025/02/20/monobloc-chair-history.html
1•olalonde•6m ago•0 comments

Designing a SystemVerilog Language Server

https://www.hudsonrivertrading.com/hrtbeat/designing-a-systemverilog-language-server/
1•hasheddan•6m ago•0 comments

Escaping the LemonSqueezy Nightmare

https://leoloso.com/posts/escaping-the-lemonsqueezy-nightmare-migrating-my-ecommerce-elsewhere/
1•leoloso•6m ago•0 comments

GoGogot – AI agent in Go, ~15 MB binary, ~10 MB RAM, MiniMax 2.5

https://go-go-got.com
1•aspasskiy•6m ago•1 comments

Show HN: ScreenStack – AI-native platform purpose-built for technical interviews

https://screenstack.tech/
1•ud0•8m ago•0 comments

Show HN: Elia – Governed hybrid architecture (LLM is capability, not authority)

https://github.com/Jmc-arch/elia-governed-hybrid-architecture
1•JMC-FR•10m ago•0 comments

Show HN: How the IP Leasing Market Fakes Legitimacy

1•xunairah•10m ago•0 comments

Graeco-Arabic translation movement

https://en.wikipedia.org/wiki/Graeco-Arabic_translation_movement
1•teleforce•11m ago•0 comments

Boy I was wrong about the Fediverse

https://matduggan.com/boy-i-was-wrong-about-the-fediverse/
1•wrxd•11m ago•0 comments

Ask HN: In the age of AI, how are you marketing your products to differentiate?

1•Gooblebrai•15m ago•0 comments

Show HN: GeoDirect – Create universal map links that work everywhere

https://geodirect.io
1•pascalveze•15m ago•0 comments

System Design and ML Interview Material

https://github.com/Ali-Meh619/System_Design_Principles
2•alimeh•17m ago•1 comments

System Design and Machine Learning Interview Material

1•alimeh•18m ago•0 comments

While Hinkley Nuclear Was Being Built, the UK Grid Decarbonized

https://cleantechnica.com/2026/03/06/while-hinkley-nuclear-was-being-built-the-uk-grid-decarbonized/
1•toomuchtodo•23m ago•1 comments

Simple Maturin Based Python Bindings to Scryer Prolog

https://github.com/philzook58/scryerpy
1•triska•30m ago•0 comments

OpenChaos: Strangers vote on what code ships to production (2 months in)

https://blog.openchaos.dev/posts/weeks-8-and-9-the-bot-only-listened-to-its-master
2•skridlevsky•31m ago•0 comments

Show HN: CV10X – AI resume builder that remembers your profile

https://www.cv10x.com
1•ennemlimuhssin•32m ago•0 comments

Writing a simple VM in less than 125 lines of C (2021)

https://www.andreinc.net/2021/12/01/writing-a-simple-vm-in-less-than-125-lines-of-c/
2•birdculture•33m ago•0 comments

Ask HN: Doctor with software development experience – careers combining both?

2•frank-cheynne•35m ago•0 comments

Uploading Pirated Books via BitTorrent Qualifies as Fair Use, Meta Argues

https://torrentfreak.com/uploading-pirated-books-via-bittorrent-qualifies-as-fair-use-meta/
1•askl•39m ago•0 comments

Show HN: Spectra – local finance dashboard with offline ML categorization

https://www.withspectra.app/
1•francesco_gab•40m ago•0 comments

Cloudflare-Native Starter Kits

https://greeff.dev/starter-kits
1•pio_greeff•42m ago•0 comments

Show HN: Pre-Launch – $15/Mo Status Page (Vs Atlassian $299) – Join Waitlist

2•Powellfgn•49m ago•0 comments

Hetzner bans website for 'violating terms'

https://twitter.com/tyleraloevera/status/2030064144980873434
2•timedude•52m ago•2 comments

Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies

https://mujs.org
2•amaury_bouchard•58m ago•0 comments

NASA's Dart Mission Changed Orbit of Asteroid Around Sun

https://www.jpl.nasa.gov/news/nasas-dart-mission-changed-orbit-of-asteroid-didymos-around-sun/
2•merksittich•59m ago•0 comments