Skip to content

Reflexion: learn from failures that repeat #485

Closed as not planned
Closed as not planned

Description

@HugoXK

What

A Bot repeats a failure it has already hit: a broken tool is retried in a loop, and a failing model call is retried the same way. Nothing about that failure is kept, so the Bot never changes course.

Expected behavior

  • When a tool call keeps erroring, or a model call fails several times in a row, the Bot writes itself one short, actionable note into its own memory ("the tool "X" has failed several times…").
  • The note is written at most once per signature per day, so a loop cannot flood memory.
  • It goes through the ordinary memory path: size-capped, secret-scanned, visible in the memory panel, removable with forget, and it never throws into the turn.
  • config.reflexion: false turns it off.

Change scope

New core/src/host/reflexion.js (pure tracker + wording), core/src/host/memory.js (reflexionNote through the existing addEntry), core/src/host/turns.js (report failed tool calls and failed turns), tests core/test/reflexion.test.js + one case in core/test/memory.test.js, docs/subsystems/core-host.md.

Why

A Reflexion-style self-improvement loop (see the roadmap discussion), reusing the tested memory write path so there is no new prompt plumbing and no new failure mode.

Activity

  1. added
    enhancementNew feature or request
    area:automationScheduled tasks and automation
    needs-humanThe agent loop stopped; a person must decide (reason in the last comment)
    on Oct 20, 2026
  2. Birfy commented on Oct 20, 2026

    @Birfy
    Collaborator

    Triage (2026-10-20 12:00 Asia/Shanghai, main a7adfe0): needs-human. Waiting on the owner to confirm whether a Bot should automatically write lasting "lessons" into its own memory after repeated failures, and if so in what shape: opt-in or default on, only identical tool failures, no model/provider failures, and notes that expire. It overlaps the existing memory review and the finish/fail notifications (#470). PR #486 is CONFLICTING and has open review findings.

  3. Birfy commented on Oct 20, 2026

    @Birfy
    Collaborator

    Owner decision (2026-10-20): option (b) — decline. Do not merge PR #486.

  4. Birfy commented on Oct 20, 2026

    @Birfy
    Collaborator

    Closed per the owner decision (2026-10-20, option b: decline). PR #486 closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:automationScheduled tasks and automationenhancementNew feature or requestneeds-humanThe agent loop stopped; a person must decide (reason in the last comment)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions