Core Features

The ReAct Agent Loop

Understanding the Reason + Act autonomous cycle, plan formulation, and test-driven self-correction.

Deterministic Autonomous Problem Solving

CACode implements a deterministic ReAct (Reason + Act) autonomous cycle designed to prevent hallucinations and ungrounded code modifications.

The 4-Stage ReAct Cycle:

  1. Thought (Reasoning): The agent analyzes the prompt, evaluates current project state, identifies missing dependencies, and outlines an architectural hypothesis.
  2. Action (Tool Call): CACode dispatches a precise, structured tool request (e.g. searching regex patterns or reading specific line ranges).
  3. Observation (Environment Feedback): The agent ingests stdout, stderr, compiler diagnostics, and test exit codes produced by the tool execution.
  4. Refinement / Self-Correction: If a build fails or tests report errors, the agent inspects the stack trace, adjusts its hypothesis, and applies correcting patches iteratively until the suite passes.

User Approval Gates & Blast Shields

You remain in full control. CACode enforces configurable safety boundaries:

  • Autonomous Read-Only: Exploration, grep, and symbol indexing run automatically without interrupting you.
  • Interactive Modification Gate: File writes, unified diffs, and shell commands require explicit [Y/n] confirmation by default (can be toggled with --yes in trusted CI scripts).
  • Atomic Git Stashing: Before applying any multi-file change, CACode creates a transient Git stash snapshot, allowing instant rollbacks via /undo if you are unsatisfied with the result.