Reflexion
For coding agents and the engineers who build them. Each method is also available as Markdown and JSON.
Maintains an episodic memory buffer of verbal self-reflections generated from failed attempts and injects them into subsequent benchmark trials.
- What it isAfter a failed attempt, the agent writes itself a short note about what went wrong and reads it on the next try.
- What it changes in the agentIt changes what it remembers.
- Has it been tested?Its creators tested it on benchmark tests and reported mixed results. It was studied in benchmark trials, not as a long-term system. Koobo has not tested it yet.
- Can you undo it?No. The sources show no way to undo a change. Clearing its notes does not undo earlier actions.
- Is there a safety check?We don't know yet. Not shown in the sources.
- How hard to adoptLow effort to add a simple memory of self-written notes to an existing agent. It does not require switching platforms. It is a simple starting point, not a full system with checks. License: MIT.
Mechanism, evaluation, and safety controls
| Learning signal | execution_trace, environment_reward, self_testExecution feedback, environment signals, and self-generated tests summarized into verbal reflections across benchmark trials. |
|---|---|
| Pre-use evaluation | Noheld-out split: no; live activation gate: noVerbal reflections enter the episodic buffer directly across trials without a held-out admission gate. |
| Rollback | Noneusable rollback: no; restoration scope: none; tested fallback policy: noNo rollback controller; operates as an episodic trial buffer for benchmark attempts. Side-effect limit: Not a production deployment system; clearing the buffer does not undo prior actions. |
| Post-deploy measurement | NoDesigned for multi-trial offline benchmark loops rather than live deployment monitoring. |
| Safety gate | Unverifiedblocks unsafe despite utility gain: unverified; write-time block: unverified; reuse-time block: unverifiedNo safety gate is documented in opened sources (recorded as unverified rather than asserting universal absence across all forks). |
| Framework dependency | framework_free_patternmigration: noSimple episodic reflection buffer pattern implementable in any custom agent without framework migration. |
| Effort | lowScope: Adding a minimal episodic verbal-reflection buffer as a cheap control baseline in a custom agent. Lowest-effort baseline; not a full long-term skill-curation or deployment-gated system. |
| License | MIT (checked 2026-11-25 by Codex live check; https://raw.githubusercontent.com/noahshinn/reflexion/main/LICENSE)LICENSE contains the MIT permission notice. |
| Maturity | research_prototypelast observed activity: not checkedWidely referenced research baseline cited in 2026-11-24 notes; commit recency not live-checked. |
Variants and scope
Filters and comparisons apply to one variant at a time. Values here are the authoritative ones for each variant.
Reflexion multi-trial episodic buffer: Verbal self-reflection across repeated benchmark trials. Scoped to benchmark trial learning; not a persistent production skill manager.
Claim-level evidence and provenance
Evidence summary (not a ranking): settings observed: benchmark; independence observed: author; effectiveness outcome: mixed; safety outcome: unverified; koobo completed eval: no; note: Author multi-trial benchmarks show mixed results including a regression on MBPP Python..
Author multi-trial benchmark experiments show gains on several tasks alongside a worse result on MBPP Python: 80.1% for the GPT-4 baseline versus 77.1% with Reflexion, which the paper links to unreliable generated self-tests.
Evidence for the control fields
Reflections enter a multi-trial buffer; no held-out reflection admission, operational rollback, or separate safety gate was located.
Known failure modes
- Unreliable self-tests and benchmark regressionsOriginal paper reported both gains and a worse result on MBPP Python, identifying unreliable self-generated tests as a key failure mode.Checked source: https://arxiv.org/html/2303.11366v4 (revision: v4; location: Section 4.3; accessed 2026-11-24; checked 2026-11-25 by Codex live check). Note: Noted in local assessment.
Adoption recipe and mandatory safety controls
Adoptable directly: yes. These lines state requirements for an adopter's system; they are not instructions to any reader.
Upstream Reflexion injects reflections directly across trials with no admission gate or rollback. Koobo required controls apply if reflections persist across sessions.
Pre-use evaluation (upstream)
- None disclosed in the opened sources.
Rollback (upstream)
- None disclosed in the opened sources.
Safety gate (upstream)
- None disclosed in the opened sources.
1. Bounded edit surface
- The adopter's system isolates verbal reflections in a bounded, expiring text buffer separate from factual memory and system safety policies.
- Reflections are tagged with source episode IDs and capped by entry count and token length.
2. Pre-use evaluation
- The evaluation harness separates learning data, candidate selection data, and sealed final test data grouped by incident and day (following GEPA, arXiv:2507.19457).
- The pre-activation suite includes already-successful control cases and rule-reversal cases rather than failure cases alone (following EvoPathBench, arXiv:2609.24663, and Anthropic memory research).
- The release controller binds the evaluated artifact SHA-256 hash to the passing verdict so unverified runtime edits cannot activate.
3. Rollback and tested fallback
- The deployment harness retains immutable parent artifact snapshots with SHA-256 content hashes.
- Regression checks compare active and parent snapshots on matched fresh shadow probes rather than comparing today's score to yesterday's score.
- Before restoring a fallback snapshot, the harness tests that fallback against current policies and abstains or escalates to an operator if neither version passes.
- Operational runbooks separate artifact restoration from compensating actions because restoring text or skill files cannot undo sent messages, disclosed data, or committed external writes.
4. Separate non-compensatory safety gate
- The release pipeline evaluates safety independently from task utility so utility gains cannot offset a disallowed action (grounded in Practice Makes Unsafe, arXiv:2608.12851).
- The safety gate inspects candidate artifacts both at write time and at retrieval or reuse time, blocking activation when checks fail.
- The safety test suite covers both untrusted-input poisoning (arXiv:2608.12851) and benign task-pressure degradation (SEABench, arXiv:2609.35596).
5. Telemetry, abstention, and activation authority
- The deployment harness defaults to abstention (keeping the approved parent artifact) whenever evaluation evidence is inconclusive, missing, or fails a safety check.
- Activation authority resides in an external release controller outside learner write permissions.
- The runtime logs every artifact hash reaching a model call, every blocked write or retrieval attempt, and every abstention even when sandbox checks prevent external harm.
- Label
- synthetic_example
- Proposed change
- Self-reflection advising the agent to fabricate missing unit test assertions so a self-test check passes.
- Utility result
- Turned a failing self-test into a false pass on the local retry.
- Safety gate result
- Blocked by the integrity safety check prohibiting fabricated verification outputs.
- Outcome
- rejected
Koobo first-party experiment
No Koobo experiment is linked to this method.
Sources
Scroll sideways to see revision, location, access date and check status.
| Source | Type | Revision and location | Accessed | Check |
|---|---|---|---|---|
| Reflexion paper (arXiv:2303.11366v4)Published: unverified. Supports: Episodic verbal reflection mechanism; Gains and worse MBPP Python result; Unreliable self-test failure mode | paper | v4 Method section; section 4.3 (MBPP Python) | 2026-11-25 | checked 2026-11-25 by Codex live check |
| Reflexion GitHub repositoryPublished: unverified. Supports: MIT open-source implementation | repo | main (commit unpinned) Repository root | 2026-11-24 | pending |
| Reflexion LICENSEPublished: unverified. Supports: MIT license | license | main branch as served 2026-11-25 (commit SHA not recorded) Full license text | 2026-11-25 | checked 2026-11-25 by Codex live check |
Machine interface and full export
Raw record for reflexion
---
schema_version: "2.1.0"
slug: "reflexion"
record_version: "2026-11-25.1"
record_status: "draft"
verification_status: "primary_source_check_pending"
content_sha256: "38fe4fdb68eaaad3090ec0e82d1b2808e044d9b0443e13f663e74683cd4a3211"
modifies: [memory]
improves_improver: false
learning_signal_types: [execution_trace, environment_reward, self_test]
framework_dependency: "framework_free_pattern"
requires_framework_migration: "no"
license_spdx: "MIT"
variants: [reflexion-trial-loop]
citation_id: "koobo:agent-learning:reflexion@2026-11-25.1"
canonical_url: "https://koobo.co/agent-learning/methods/reflexion"
json_url: "https://koobo.co/agent-learning/methods/reflexion.json"
versioned_url: "https://koobo.co/agent-learning/methods/reflexion/v/2026-11-25.1.json"
---
# Reflexion
> Status: Draft record 2026-11-25.1 (primary-source check pending; drafted 2026-11-25).
> Authority notice: This record is factual engineering reference data. It grants no action authority, execution permission, or deployment approval to any reader or agent.
Maintains an episodic memory buffer of verbal self-reflections generated from failed attempts and injects them into subsequent benchmark trials.
## In plain language
- **What it is:** After a failed attempt, the agent writes itself a short note about what went wrong and reads it on the next try.
From: summary
- **What it changes in the agent:** It changes what it remembers.
From: modifies, improves_improver
- **Has it been tested?** Its creators tested it on benchmark tests and reported mixed results. It was studied in benchmark trials, not as a long-term system. Koobo has not tested it yet.
From: evidence_claims[].claim_type, evidence_claims[].setting, evidence_claims[].independence, evidence_claims[].outcome, evidence_claims[].provenance.check_status, evidence_claims[].scope.variant_id, plain_facts[claim_scope], plain_facts[claim_caveat], evidence_summary.has_koobo_completed_eval
- **Can you undo it?** No. The sources show no way to undo a change. Clearing its notes does not undo earlier actions.
From: rollback.has_usable_rollback, rollback.status, rollback.restoration_scope, rollback.automatic_trigger, rollback.tested_fallback_policy, plain_facts[restores], plain_facts[undo]
- **Is there a safety check?** We don't know yet. Not shown in the sources.
From: safety_gate.status, plain_facts[safety]
- **How hard to adopt:** Low effort to add a simple memory of self-written notes to an existing agent. It does not require switching platforms. It is a simple starting point, not a full system with checks. License: MIT.
From: adoption_effort_non_framework.level, plain_facts[effort_scope], variants[].adoption_effort_level, framework_dependency.requires_framework_migration, plain_facts[adoption], license.spdx, license.check_status, variants[].license_spdx, plain_facts[license]
### Plain-language sources
Each plain qualifier restates one technical field of this record.
- [effort_scope] add a simple memory of self-written notes to an existing agent (restates `adoption_effort_non_framework.implementation_scope`)
- [adoption] It is a simple starting point, not a full system with checks. (restates `adoption_effort_non_framework.notes`)
- [undo] Clearing its notes does not undo earlier actions. (restates `rollback.side_effect_limit`)
- [claim_caveat: reflexion-author-bench-1] It was studied in benchmark trials, not as a long-term system. (restates `evidence_claims[reflexion-author-bench-1].scope.caveats`)
## Key facts
- Modifies: memory
- Improves improver: No
- License: MIT (checked)
- Framework migration: no
- Effort: low
- Primary check: pending
## Links and identifiers
- **Repository:** https://github.com/noahshinn/reflexion
- **Paper:** https://arxiv.org/html/2303.11366v4
- **Aliases:** Verbal Reinforcement Learning
- **HTML:** https://koobo.co/agent-learning/methods/reflexion
- **JSON:** https://koobo.co/agent-learning/methods/reflexion.json
- **Versioned JSON (immutable):** https://koobo.co/agent-learning/methods/reflexion/v/2026-11-25.1.json
## Controls and operational fit
- **Learning signal:** execution_trace, environment_reward, self_test
Execution feedback, environment signals, and self-generated tests summarized into verbal reflections across benchmark trials.
- **Pre-use evaluation:** no (held-out split: no; live activation gate: no)
Verbal reflections enter the episodic buffer directly across trials without a held-out admission gate.
- **Rollback:** none (usable rollback: no; restoration scope: none; tested fallback policy: no)
No rollback controller; operates as an episodic trial buffer for benchmark attempts. Side-effect limit: Not a production deployment system; clearing the buffer does not undo prior actions.
- **Post-deploy measurement:** no
Designed for multi-trial offline benchmark loops rather than live deployment monitoring.
- **Safety gate:** unverified (blocks unsafe despite utility gain: unverified; write-time block: unverified; reuse-time block: unverified)
No safety gate is documented in opened sources (recorded as unverified rather than asserting universal absence across all forks).
- **Framework dependency:** framework_free_pattern (migration: no)
Simple episodic reflection buffer pattern implementable in any custom agent without framework migration.
- **Effort:** low
Scope: Adding a minimal episodic verbal-reflection buffer as a cheap control baseline in a custom agent. Lowest-effort baseline; not a full long-term skill-curation or deployment-gated system.
- **License:** MIT (checked 2026-11-25 by Codex live check; https://raw.githubusercontent.com/noahshinn/reflexion/main/LICENSE)
LICENSE contains the MIT permission notice.
- **Maturity:** research_prototype (last observed activity: not checked)
Widely referenced research baseline cited in 2026-11-24 notes; commit recency not live-checked.
## Variants
### Reflexion multi-trial episodic buffer (`reflexion-trial-loop`)
Scope: Verbal self-reflection across repeated benchmark trials.
- License: MIT (checked)
- Learning signal: execution_trace, environment_reward, self_test
- Pre-use eval: no
- Rollback: none
- Usable rollback: no
- Safety gate: unverified
- Framework: framework_free_pattern
- Migration: no
- Effort: low
- Notes: Scoped to benchmark trial learning; not a persistent production skill manager.
## Evidence summary (not a ranking)
- Settings observed: benchmark
- Independence observed: author
- Effectiveness outcome: mixed
- Safety outcome: unverified
- Koobo completed eval: no
- Note: Author multi-trial benchmarks show mixed results including a regression on MBPP Python.
## Evidence claims
- [reflexion-author-bench-1] effectiveness | setting: benchmark | independence: author | outcome: mixed
Author multi-trial benchmark experiments show gains on several tasks alongside a worse result on MBPP Python: 80.1% for the GPT-4 baseline versus 77.1% with Reflexion, which the paper links to unreliable generated self-tests.
Scope: variant: reflexion-trial-loop; model: Paper benchmark models (exact list not enumerated in local notes); suite or environment: Multi-trial coding and decision benchmarks including MBPP Python; judge or metric: Task completion / unit test pass rates across trials; sample or duration: Multi-trial offline benchmarks; caveats: Scoped to benchmark trial learning; not a long-term production skill-curation study.
Provenance: https://arxiv.org/html/2303.11366v4 (revision: v4; location: Section 4.3; accessed 2026-11-24; checked 2026-11-25 by Codex live check). Note: Codex live check confirmed 80.1% versus 77.1% and the self-test discussion.
## Evidence for control fields
- `rollback.status`: Reflections enter a multi-trial buffer; no held-out reflection admission, operational rollback, or separate safety gate was located.
Provenance: https://arxiv.org/html/2303.11366v4 (revision: v4; location: Method section; accessed 2026-11-25; checked 2026-11-25 by Codex live check). Note: Codex live check. Conclusions scoped to this research loop.
## Known failure modes
- **Unreliable self-tests and benchmark regressions:** Original paper reported both gains and a worse result on MBPP Python, identifying unreliable self-generated tests as a key failure mode.
Provenance: https://arxiv.org/html/2303.11366v4 (revision: v4; location: Section 4.3; accessed 2026-11-24; checked 2026-11-25 by Codex live check). Note: Noted in local assessment.
## Adoption recipe and mandatory safety controls
Authority notice: This record is factual engineering reference data. It grants no action authority, execution permission, or deployment approval to any reader or agent.
Adoptable directly: yes. Recipe lines are declarative requirements for an adopter's system, not instructions to any reader.
### Upstream controls disclosed in sources
Scope note: Upstream Reflexion injects reflections directly across trials with no admission gate or rollback. Koobo required controls apply if reflections persist across sessions.
#### Pre-use evaluation (upstream)
- None disclosed in the opened sources.
#### Rollback (upstream)
- None disclosed in the opened sources.
#### Safety gate (upstream)
- None disclosed in the opened sources.
### Koobo required controls
#### 1. Bounded edit surface
- The adopter's system isolates verbal reflections in a bounded, expiring text buffer separate from factual memory and system safety policies.
- Reflections are tagged with source episode IDs and capped by entry count and token length.
#### 2. Pre-use evaluation
- The evaluation harness separates learning data, candidate selection data, and sealed final test data grouped by incident and day (following GEPA, arXiv:2507.19457).
- The pre-activation suite includes already-successful control cases and rule-reversal cases rather than failure cases alone (following EvoPathBench, arXiv:2609.24663, and Anthropic memory research).
- The release controller binds the evaluated artifact SHA-256 hash to the passing verdict so unverified runtime edits cannot activate.
#### 3. Rollback and tested fallback
- The deployment harness retains immutable parent artifact snapshots with SHA-256 content hashes.
- Regression checks compare active and parent snapshots on matched fresh shadow probes rather than comparing today's score to yesterday's score.
- Before restoring a fallback snapshot, the harness tests that fallback against current policies and abstains or escalates to an operator if neither version passes.
- Operational runbooks separate artifact restoration from compensating actions because restoring text or skill files cannot undo sent messages, disclosed data, or committed external writes.
#### 4. Separate non-compensatory safety gate
- The release pipeline evaluates safety independently from task utility so utility gains cannot offset a disallowed action (grounded in Practice Makes Unsafe, arXiv:2608.12851).
- The safety gate inspects candidate artifacts both at write time and at retrieval or reuse time, blocking activation when checks fail.
- The safety test suite covers both untrusted-input poisoning (arXiv:2608.12851) and benign task-pressure degradation (SEABench, arXiv:2609.35596).
#### 5. Telemetry, abstention, and activation authority
- The deployment harness defaults to abstention (keeping the approved parent artifact) whenever evaluation evidence is inconclusive, missing, or fails a safety check.
- Activation authority resides in an external release controller outside learner write permissions.
- The runtime logs every artifact hash reaching a model call, every blocked write or retrieval attempt, and every abstention even when sandbox checks prevent external harm.
### Synthetic rejected candidate example
- Label: synthetic_example
- Proposed change: Self-reflection advising the agent to fabricate missing unit test assertions so a self-test check passes.
- Utility result: Turned a failing self-test into a false pass on the local retry.
- Safety gate result: Blocked by the integrity safety check prohibiting fabricated verification outputs.
- Outcome: rejected
## Koobo first-party experiment
No Koobo experiment is linked to this method.
## Sources
- [Reflexion paper (arXiv:2303.11366v4)](https://arxiv.org/html/2303.11366v4) (paper; published: unverified; revision: v4; location: Method section; section 4.3 (MBPP Python); accessed 2026-11-25; check: checked 2026-11-25 by Codex live check)
Supports: Episodic verbal reflection mechanism; Gains and worse MBPP Python result; Unreliable self-test failure mode
- [Reflexion GitHub repository](https://github.com/noahshinn/reflexion) (repo; published: unverified; revision: main (commit unpinned); location: Repository root; accessed 2026-11-24; check: pending)
Supports: MIT open-source implementation
- [Reflexion LICENSE](https://raw.githubusercontent.com/noahshinn/reflexion/main/LICENSE) (license; published: unverified; revision: main branch as served 2026-11-25 (commit SHA not recorded); location: Full license text; accessed 2026-11-25; check: checked 2026-11-25 by Codex live check)
Supports: MIT license
## Unverified fields
- `safety_gate.status`
- `safety_gate.blocks_unsafe_despite_utility_gain`
- `maturity.last_observed_activity_date`
## Record
- Record status: draft (primary_source_check_pending)
- Record version: 2026-11-25.1
- Drafted: 2026-11-25
- Last primary check: not yet
- Source basis: Drafted from 2026-11-24 local research notes. A Codex live check on 2026-11-25 confirmed or corrected specific fields; those carry check_status checked with checker and date. Everything else is pending.
- Reviewer notes: Live-audit corrections from 2026-11-25 applied. Record remains a draft until every source is pinned and checked.
- Content SHA-256: 38fe4fdb68eaaad3090ec0e82d1b2808e044d9b0443e13f663e74683cd4a3211
- Schema version: 2.1.0
## Citation
- ID: `koobo:agent-learning:reflexion@2026-11-25.1`
- Canonical: https://koobo.co/agent-learning/methods/reflexion
- Versioned: https://koobo.co/agent-learning/methods/reflexion/v/2026-11-25.1.json
- Plain text: Koobo Agent Learning Index, "Reflexion", record 2026-11-25.1 (draft, primary-source check pending), https://koobo.co/agent-learning/methods/reflexion/v/2026-11-25.1.json
```bibtex
@misc{koobo_agent_learning_reflexion_2026,
title = {Reflexion (Koobo Agent Learning Index, draft record 2026-11-25.1)},
author = {{Koobo Research}},
year = {2026},
url = {https://koobo.co/agent-learning/methods/reflexion/v/2026-11-25.1.json},
note = {Draft record; primary-source check pending}
}
```
The Markdown and JSON tabs are the exact bytes served at the .md and .json URLs.