The Problem

AI coding agents are all-or-nothing. You either let the model do everything or you do it yourself. There is no middle ground. If you want to learn from the process, you have to fight the tool to stop it from writing code for you. If you want full autonomy, you have to babysit it through confirmations and approvals it does not need. The level of automation is baked into the tool, not chosen by the user.

HumanCode is a terminal-based AI coding agent that gives you a dial instead of a switch. Five agent modes, each with a different level of autonomy, so you pick the right one for the task at hand.

Agent Modes

Pair

Pair is read-only. It cannot write code. It reads your codebase, asks guiding questions, and suggests approaches without giving you the answer. If you ask it to implement something, it refuses and tells you to switch modes.

This is the mode for learning. If you are trying to understand how a piece of code works, or you want to think through a design decision before committing to it, Pair forces you to do the thinking. It acts like a senior engineer sitting next to you who will point you in the right direction but will not take the keyboard.

The key design decision was making it truly read-only. Early versions could still write code if you pushed hard enough. I restricted its tool access to only read, glob, grep, websearch, and webfetch. No write tool, no edit tool, no bash. If the model cannot call the tool, it cannot drift into writing code no matter how the conversation goes.

Debug

Debug writes one logical step at a time, then uses a live debugger to verify it before moving on. It follows a strict phase cycle: plan, code, set breakpoints, run the debugger, explain what happened, ask if you are ready for the next step.

Under the hood, it uses an MCP server that wraps the Debug Adapter Protocol for Node.js and Python. The agent sets breakpoints, runs your code, stops at each one, inspects variables and call stacks, and walks you through what it sees. In guided mode it pauses after each breakpoint and waits for you to respond before continuing.

This is the mode for risky changes. Complex refactors, untested code, anything where you want to verify each step before the next one happens.

I built Debug mode because I noticed that when agents write multiple steps at once and something breaks, the debugging session devolves into guesswork. The agent does not know which step introduced the bug. Forcing it to verify each step with the actual debugger before moving on means failures are caught where they happen, not three steps later.

Vibe

Vibe is a task manager. It parses your prompt into discrete numbered tasks, asks you to confirm the list, then executes each one sequentially. After each task it runs a review sub-agent to check quality. If the review finds issues, it fixes them before moving to the next task.

This is the mode for multi-step features. A request that spans several files or involves multiple distinct changes gets broken into a checklist that you approve before any work starts.

The decision to require user confirmation on the task list before starting was deliberate. Without it, the agent would parse “add auth and update the dashboard” into five tasks and start executing immediately. Half the time its breakdown would be wrong and you would not find out until it was three tasks deep. The confirmation step costs five seconds and saves entire sessions.

Claw

Claw is fully autonomous. Single prompt in, completed work out. It plans, executes, writes tests, self-reviews, and presents the final result. It never asks for confirmation except for destructive operations like force pushing or deleting files outside the project. It runs in an isolated git worktree so if something goes wrong, your working tree is untouched.

This is the mode for well-scoped mechanical tasks. Straightforward changes where you know what you want and do not need to be involved in the process.

The worktree isolation was a non-negotiable. An autonomous agent that writes directly to your working tree is one bad prompt away from trashing uncommitted work. Running in an isolated git worktree means the worst case is deleting a branch, not losing changes.

Adaptive

Adaptive dynamically picks a mode based on what you are asking. Simple mechanical work routes to Claw behavior. Multi-file features route to Vibe. Complex refactors or untested code routes to Debug. If you ask “why does this work,” it switches to Pair.

It also escalates and de-escalates as the task evolves. Two consecutive test failures trigger a suggestion to switch to Debug. Three successful steps in a row trigger a suggestion to switch to Claw. If you say “just do it,” it switches to Claw immediately.

Adaptive is the default mode. Press Tab to switch manually.

The assessor that picks the mode was originally a heuristic: regex patterns, file counts, keyword matching. It was unreliable. A prompt like “refactor the auth module” would sometimes route to Claw because the heuristic did not understand what refactoring implied. I replaced it with an LLM-based assessor that reads the prompt and picks a concrete mode, which made routing significantly more accurate.

Keeping Modes Honest

Early on I noticed the agent drifting. Pair mode would start writing code. Claw mode would ask for permission when it should not. The modes were not enforcing their own constraints.

The fix was rewriting every mode prompt with a hard identity and structural enforcement. Each mode now has a HARD CONSTRAINTS section with numbered rules that cannot be violated, a WORKFLOW section with the exact phase sequence, and an EXCEPTION CASES section for the narrow set of situations where the rules bend. I also added periodic mode reminders injected into the conversation to prevent behavioral drift over long sessions.

Watch Mode

Claw has a watch mode that monitors your project for file changes. It uses Parcel’s file watcher with an LLM-based scope inferrer that determines which glob patterns are relevant to your project, so it does not watch everything indiscriminately. When you save a file, it picks up the change, figures out what you are working on, and reacts accordingly.

Try It

brew install humancode

or

npm i -g humancode

Takeaway

The insight behind HumanCode is that different tasks need different levels of AI involvement. Sometimes you want to learn and the agent should only guide you. Sometimes you want something done and the agent should just do it. Sometimes you are not sure and the agent should figure it out. Rather than hoping a single agent personality covers all cases, HumanCode encodes each as a distinct behavioral mode with hard constraints that keep it honest.