Autonomous Agents
CollaborationScan Board, Claim Tasks
Teammates scan the board and claim tasks themselves; no need for the lead to assign each one
s01 > s02 > s03 > s04 > s05 > s06 > s07 > s08 > s09 > s10 > [ s11 ] s12
"Give the agent a goal, let it decide how" -- from passive tools to active autonomous cycles.
Harness layer: Collaboration -- self-reflection, goal decomposition, autonomous decision-making.
Problem
Previous 10 sessions had passive agents: user gives specific instructions, agent executes step by step. Real autonomous agents need: high-level goals, self-decomposition, planning, execution, and verification.
Solution
Autonomous Cycle: THINK → PLAN → ACT → VERIFY → REFLECT → (loop if not done)
Key Code
class AutonomousAgent:
def run(self, goal):
for cycle in range(MAX_CYCLES):
thought = self.think(goal)
plan = self.plan(thought)
result = self.act(plan)
verdict = self.verify(result)
reflection = self.reflect(goal, verdict)
if reflection["done"]: return reflection["summary"]
goal = reflection["refined_goal"]
What's New (s10 → s11)
| Component | s10 | s11 |
|---|---|---|
| Control | Passive response | Autonomous cycle |
| Goals | Specific instructions | High-level goals |
| Reflection | None | Per-cycle self-reflection |
Deep Dive
Q1: How to avoid infinite loops?
Triple protection: MAX_CYCLES hard limit, token budget (s15), "goal unreachable" detection in reflection.
Q2: THINK vs Think Tool (s19)?
s19 Think Tool = model-initiated reasoning (on-demand). s11 THINK = mandatory cycle phase (system-level). Complementary.
Q3: Can goal refinement drift from original intent?
Yes. Solution: preserve original goal, compare at each reflection, realign if divergent.
Q4: Relation to s16 Long-Running Harness?
s16 uses Planner/Generator/Evaluator triad for code. s11 uses THINK/PLAN/ACT/VERIFY/REFLECT for general autonomy.
Q5: Can VERIFY be automated?
Yes — s13's TDAD + LLM-as-Judge can embed directly into VERIFY for objective metrics.
Try It
cd learn-claude-code
python agents/s11_autonomous_agents.py
References
- Building Effective Agents — Anthropic, Dec 2025. Autonomous agent patterns.
- Agentic Coding Trends 2026 — Anthropic, Mar 2026.
- ReAct: Synergizing Reasoning and Acting — Yao et al., 2022.