75 / 90

Day 75: Failure Feedback, Bounded Repair, and Independently Verified Outcomes

Inject documented faults, observe structured error feedback, exercise the controlled repair path, and verify outcomes with the independent scorer - without collecting hidden chain-of-thought.

Agents 480 active minutes (8 hours)
01 120 min

Controlled Repair Path: invalid_arguments Feedback then Recovery

Agent-Assisted Engineering Check

Prerequisites

Day 74 validation layers; the deterministic adapter fault modes.

Learning Objective

Run the injected invalid_arguments fault, observe the structured error observation, and confirm the adapter recovers inside the retry budget to a completed, externally verified run.

Instructions

1. In a REPL, run the task with DeterministicModelAdapter(fault="invalid_arguments") and AgentConfig(max_steps=6, max_retries=2) inside a tempfile workspace.
2. Step 1 proposes read_note with filename ../outside.txt; the basename rule rejects it: observation {ok:false, error:invalid_arguments}; the retries counter becomes 1.
3. On the next model request the adapter re-plans from history (no successful list_notes yet), issues list_notes, then both reads, then write_report - a controlled repair path: the bad call is never silently retried; the error observation steers the next action.
4. Verify RunResult: status completed, steps 5, retries 1, termination goal_reached; then score it with evaluate().
5. Contrast with Reflexion-style verbal feedback: our adapter re-reads the failure observation; it does not store reasoning text - the repair evidence lives entirely in the action/observation trace.

Practice & Prediction Log

Execute the fault run; record trace[0].observation.error, trace[1].observation.ok, steps, retries, status, and termination; confirm report.txt content equals expected_report().

Independent Mastery Criterion

Reproduce the repair path with exact counters (steps=5, retries=1, completed/goal_reached) and explain why the same bad call is never retried verbatim.

Authoritative Source Resources & Provenance

linking Open Access / CC BY 4.0

Reflexion: Language Agents with Verbal Reinforcement Learning

Author: Noah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan, Shunyu Yao | Original Source Link ↗

Relevant Section / Range: Section 2 & 3 (Reflexion Architecture and Memory Buffer)

Verified Version & Date: NeurIPS 2023 / arXiv:2303.11366v4 (Verified: 2026-10-30)

Selection Rationale:

Rigorous framework analyzing dynamic error feedback, memory buffering of execution failures, and controlled self-reflection loops without updating model weights.

Source Prerequisites:

Reinforcement learning concepts, agent evaluation loops, and error feedback handling.

Safe Fallback (Offline Resilience):

Error recovery state diagrams and retry budget algorithms are detailed in curriculum materials.

Compared Candidate Sources & Selection Analysis (2)

Single-turn generative text refinement; Reflexion operates across multi-turn external environment action-observation failures.

Domain-specific LLM-based agent for open-world Minecraft; Reflexion establishes domain-general verbal feedback control loops.

linking Open Access / CC BY 4.0

ReAct: Synergizing Reasoning and Acting in Language Models

Author: Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, Yuan Cao | Original Source Link ↗

Relevant Section / Range: Section 3 & 4 (ReAct Formulation and Synergy)

Verified Version & Date: ICLR 2023 / arXiv:2210.03629v2 (Verified: 2026-10-30)

Selection Rationale:

Foundational academic paper introducing the interleaved Thought-Action-Observation control loop in LLM agents, establishing formal interleaving of task reasoning and external tool execution.

Source Prerequisites:

Prompt engineering, token generation basics, and conversational interaction loops.

Safe Fallback (Offline Resilience):

Complete algorithmic step traces, state loop diagrams, and control loop pseudocode are self-contained in curriculum materials.

Compared Candidate Sources & Selection Analysis (2)

Pure reasoning without environmental actions or external tool grounding; ReAct extends reasoning into an interactive environment action-observation loop.

Early neuro-symbolic modular router concept; ReAct offers simpler, prompting-native action-observation loop dynamics suitable for standard API models.

02 120 min

Safe Termination: missing_note and loop Fault Budgets

Independent Mastery Check (no AI assistance).

Prerequisites

Day 75 Activity 1: the retry counter and its budget.

Learning Objective

Independently demonstrate both non-goal terminations: tool_failure after retry overflow (fault missing_note) and step_budget exhaustion (fault loop), and state why unbounded retries are unsafe.

Instructions

1. fault="missing_note": the adapter always proposes read_note missing.txt; each observation is not_found; with AgentConfig(max_steps=4, max_retries=1) the second failure pushes retries to 2 > 1: status failed, termination tool_failure, and no report.txt exists.
2. fault="loop": the adapter proposes list_notes forever; with AgentConfig(max_steps=2, max_retries=1) the run ends after exactly 2 steps: status budget_exhausted, termination step_budget.
3. Tabulate both runs: status, steps, retries, termination, report.txt present?
4. Write two sentences on why finite step/retry budgets matter: an unbounded loop converts a stuck policy into unbounded cost; budgets convert a hang into a structured, inspectable termination.
5. Independent Mastery Check applies here - run and tabulate without assistance.

Practice & Prediction Log

Produce both fault runs and a four-column table (status, steps, retries, termination); verify report.txt is absent in both workspaces.

Independent Mastery Criterion

Both terminations reproduced unaided with correct counters plus a two-sentence explanation of why retry and step budgets must be finite.

Authoritative Source Resources & Provenance

linking Anthropic PBC copyright (no open license stated) / linked reference Linking only; no documentation text is copied

Anthropic Tool Use (Function Calling) Implementation Guide

Author: Anthropic PBC | Original Source Link ↗

Relevant Section / Range: Tool Use Overview, Schema Definitions, and Stop Reasons

Verified Version & Date: Claude API Specification (Verified: 2026-10-30)

Selection Rationale:

Detailed production reference for client-side tool definitions, tool_use content blocks, stop reason tool_use, and tool_result response formatting.

Source Prerequisites:

REST API concepts, JSON schema specification, and basic Python client programming.

Safe Fallback (Offline Resilience):

Offline mock request/response cycles and tool payload schemas are provided in the repo.

Compared Candidate Sources & Selection Analysis (2)
Google Gemini Function Calling Documentation ↗ compared_alternative [Creative Commons Attribution 4.0]

Protobuf and REST function declaration schema; Anthropic documentation provides explicit structured message block mechanics (tool_use / tool_result).

Cohere Tool Use and Multi-Step Agents Guide ↗ compared_alternative [Open Documentation]

Multi-step tool calling parameter definitions; Anthropic specification demonstrates clear separated content blocks essential for inspectable event traces.

linking Open Access / CC BY 4.0

Reflexion: Language Agents with Verbal Reinforcement Learning

Author: Noah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan, Shunyu Yao | Original Source Link ↗

Relevant Section / Range: Section 2 & 3 (Reflexion Architecture and Memory Buffer)

Verified Version & Date: NeurIPS 2023 / arXiv:2303.11366v4 (Verified: 2026-10-30)

Selection Rationale:

Rigorous framework analyzing dynamic error feedback, memory buffering of execution failures, and controlled self-reflection loops without updating model weights.

Source Prerequisites:

Reinforcement learning concepts, agent evaluation loops, and error feedback handling.

Safe Fallback (Offline Resilience):

Error recovery state diagrams and retry budget algorithms are detailed in curriculum materials.

Compared Candidate Sources & Selection Analysis (2)

Single-turn generative text refinement; Reflexion operates across multi-turn external environment action-observation failures.

Domain-specific LLM-based agent for open-world Minecraft; Reflexion establishes domain-general verbal feedback control loops.

03 120 min

Independent Scoring Harness and Reproducible Evaluation Artifact

Independent Mastery Check (no AI assistance).

Prerequisites

Day 75 Activities 1-2 observed runs.

Learning Objective

Score runs with evaluate() on four independent dimensions - outcome, tool behavior, budget, failure handling - and prove the CLI artifact is deterministic and free of chain-of-thought fields.

Instructions

1. evaluate() re-verifies the workspace: report_ok requires the file to exist AND its bytes to equal expected_report() - external verification, not the adapter's self-report.
2. The four scoring dimensions: outcome_passed (correct report artifact), tool_behavior_passed (every action name in ALLOWED_TOOLS), budget_passed (steps <= 6 and not budget_exhausted), failure_handling_passed (every error code is a known structured code and any failure ends in a safe termination).
3. Run the CLI twice into two files and diff them - byte-identical output is what makes the artifact reproducible evidence.
4. Run python -m unittest tests.projects.test_agent_learning -v: all six tests must pass.
5. Scan the artifact for forbidden keys (thought, chain_of_thought) - the trace policy collects actions and observations only.
6. Record the model identity honestly: evidence.model_adapter is deterministic-v1, a fixture; it says nothing about live-model quality.

Practice & Prediction Log

Capture /tmp/agent-run.json metrics and the unittest summary; state each scoring dimension in one line and why a passing process exit alone is not a verified outcome.

Independent Mastery Criterion

Explain all four scoring dimensions and why process exit code alone is not verified learning evidence, with the deterministic-v1 limitation stated.

Authoritative Source Resources & Provenance

linking IETF Trust License / Open Standard

RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format

Author: Tim Bray (Ed.) | Original Source Link ↗

Relevant Section / Range: Section 1-4 (JSON Syntax and Grammar)

Verified Version & Date: IETF Standards Track RFC 8259 (Verified: 2026-10-30)

Selection Rationale:

Foundational Internet standard defining strict JSON grammar, token parsing, and whitespace rules underpinning model tool calling serialization.

Source Prerequisites:

Text encoding, UTF-8 parsing, and serialized data exchange.

Safe Fallback (Offline Resilience):

JSON grammar parsing rules and error recovery guidelines are documented in curriculum notes.

Compared Candidate Sources & Selection Analysis (2)
RFC 7049: Concise Binary Object Representation (CBOR) ↗ compared_alternative [IETF Open Standard]

Binary serialization standard; text-based LLMs operate primarily on human-readable UTF-8 JSON interchange formats.

YAML 1.2 Specification (OASIS / yaml.org) ↗ compared_alternative [Open Standard]

Indentation-sensitive text format; JSON has universally standardized parsing across language runtimes and tool schemas.

linking Apache-2.0 (specification; unrelicensed legacy contributions remain MIT) / Open Specification

Model Context Protocol (MCP) Specification

Author: Anthropic PBC & Open Source Contributors | Original Source Link ↗

Relevant Section / Range: Architecture Overview, Transports, Tools, and Resources

Verified Version & Date: MCP Specification 2024-11-05 (Verified: 2026-10-30)

Selection Rationale:

Normative open architecture specification defining Host, Client, and Server separation, resource subscriptions, tool listing/invoking primitives, and JSON-RPC 2.0 message framing.

Source Prerequisites:

Client-server architecture, JSON-RPC 2.0 protocol, and standard IO communication.

Safe Fallback (Offline Resilience):

Architectural comparison tables, loop invariants, and message frame examples are self-contained in curriculum materials.

Compared Candidate Sources & Selection Analysis (2)

Precursor JSON-RPC architecture for code intelligence in IDEs; MCP adapts similar client-server decoupling specifically for LLM context, tools, and prompts.

OpenAI Responses API Built-in Tools ↗ compared_alternative [Proprietary Documentation]

Hosted, vendor-managed built-in tool execution (successor to the Assistants API tools); MCP provides an open, decoupled local/remote client-server standard.

04 120 min

Evidence Ledger, Limitations Disclosure, and Scheduled Review

Independent Mastery Check (no AI assistance).

Prerequisites

Day 75 Activities 1-3 artifacts saved.

Learning Objective

Assemble the run evidence ledger - commands, adapter identity, metrics, termination table - with explicit limitations, verify your selected Agent Tool Track, and write the scheduled-review plan.

Instructions

1. Build evidence-ledger.json: command lines, fixture name, model_adapter id, workspace policy (tempfile workspace, never the repository tree), metrics from the artifact, and the artifact path.
2. Disclose at least four limitations: deterministic policy is not a live model; budgets and path checks are teaching controls, not an OS sandbox; three tools demonstrate shape, not MCP or tool_use protocol compliance; network was disabled by construction so no provider evidence exists.
3. Selected-track check: open /your-language/agent-track in the site, confirm your chosen Agent Tool Track is still selected, and note which parts of today's method are shared (loop, budgets, evidence) versus tool-specific (commands, permissions UI).
4. Scheduled review plan (spaced retrieval): tomorrow, re-derive the five loop stages and the termination table from memory, re-run the CLI, and diff the artifact; next week, re-run one fault scenario and re-score it with evaluate() before reading your notes.
5. Independent rubric: every ledger claim names its verifying artifact or command; limitations list complete; no claim of live-model capability anywhere.

Practice & Prediction Log

Write evidence-ledger.json plus a five-item limitations list and the scheduled review checklist; each ledger claim must cite its artifact.

Independent Mastery Criterion

Independent: ledger reproduces metrics from saved artifacts, at least four honest limitations disclosed, selected track verified, zero live-model claims.

Authoritative Source Resources & Provenance

linking arXiv.org perpetual non-exclusive license / Open Access

Toolformer: Language Models Can Teach Themselves to Use Tools

Author: Timo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu, Maria Lomeli, Luke Zettlemoyer, Nicola Cancedda, Thomas Scialom | Original Source Link ↗

Relevant Section / Range: Section 2 (Approach: Tool Use and Filtering)

Verified Version & Date: NeurIPS 2023 / arXiv:2302.04761v1 (Verified: 2026-10-30)

Selection Rationale:

Original paper demonstrating self-supervised discovery and execution of tool API calls (calculator, QA, search, calendar) via inline tokenized tool invocations.

Source Prerequisites:

Transformer autoregressive generation, API calling syntax, and self-supervised filtering.

Safe Fallback (Offline Resilience):

Inline tool invocation formats and self-contained mock execution traces are provided in curriculum notes.

Compared Candidate Sources & Selection Analysis (2)
Gorilla: Large Language Model Connected with Massive APIs (Patil et al. 2023) ↗ compared_alternative [Apache-2.0 / arXiv Open Access]

Focuses on massive API retrieval and documentation formatting; Toolformer focuses on the fundamental token-level seam between model generation and tool execution.

TALM: Tool Augmented Language Models (Parisi et al. 2022) ↗ compared_alternative [arXiv Open Access]

Iterative search-and-execute augmentation; Toolformer provides clearer self-supervised API call tokenization syntax.

linking Open Access / CC BY 4.0

Reflexion: Language Agents with Verbal Reinforcement Learning

Author: Noah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan, Shunyu Yao | Original Source Link ↗

Relevant Section / Range: Section 2 & 3 (Reflexion Architecture and Memory Buffer)

Verified Version & Date: NeurIPS 2023 / arXiv:2303.11366v4 (Verified: 2026-10-30)

Selection Rationale:

Rigorous framework analyzing dynamic error feedback, memory buffering of execution failures, and controlled self-reflection loops without updating model weights.

Source Prerequisites:

Reinforcement learning concepts, agent evaluation loops, and error feedback handling.

Safe Fallback (Offline Resilience):

Error recovery state diagrams and retry budget algorithms are detailed in curriculum materials.

Compared Candidate Sources & Selection Analysis (2)

Single-turn generative text refinement; Reflexion operates across multi-turn external environment action-observation failures.

Domain-specific LLM-based agent for open-world Minecraft; Reflexion establishes domain-general verbal feedback control loops.