Source-linked AI summary
Lifelong Context Adaptation through Bidirectional Memory-Skill Learning
Tianyi Xu, Huazheng Wang
TL;DR
Lifelong agents must learn from growing interaction histories while making decisions within bounded context, and memory or skills alone may leave task-solving gaps. MEMCRYST jointly learns episodic memory, facts, and reusable skills with a frozen language model, while outcomes adjust retrieval influence. Across ten settings it leads seven reported comparisons, including a 63.17% ALFWorld success result for joint serving.
Problem
Lifelong agents must use expanding interaction histories within bounded context, while retrieved memories may lack procedures and skills may lack task-specific facts.
Source: §1 · p. 1Method
MEMCRYST uses a frozen language model with episodic memory, typed facts, and skills learned from recurring episodes, while outcomes adjust retrieval influence of served records.
Source: §1 · pp. 1–2Results
Across ten settings MEMCRYST leads seven reported comparisons; on ALFWorld it reaches 63.17% success, exceeding memory-only serving by 3.33 percentage points and skill-only serving by 12.67 points.
Source: §1 · p. 2Takeaways & Limitations
The results support bidirectional memory–skill learning as a way to turn accumulated experience into useful context without updating model parameters.
Source: §6 · pp. 8–9Outcome return assigns the same task outcome to every served fact and skill, cannot identify individual causal contributions or factual truth, and robustness to erroneous feedback remains untested.
Source: Limitations · p. 9
Abstract
from arXiv · showhide
Lifelong LLM agents must learn from an expanding history of interactions while making each decision within a bounded context window. Memory makes past experience available, but the agent may still need to infer how to solve each new task from the retrieved records. Skills provide reusable procedures, yet may omit the task-specific facts needed to apply them. Because retrieved memory and skills shape the agent's behavior, they also influence the experience available for future learning. We introduce MemCryst, a framework for lifelong context adaptation through bidirectional learning of memory and skills with a frozen language model. Recurring episodes stored in memory support skill creation and revision, and the interactions guided by those skills supply new memory for subsequent learning. Facts retrieved from memory and learned skills jointly form the agent's context, while task outcomes adjust the future retrieval influence of the records actually served without rewriting their content. Across ten settings spanning embodied control, long-document reading, conversation, mathematics, and code, MemCryst leads seven reported comparisons. On ALFWorld, joint serving achieves 63.17% success, compared with 59.83% for memory-only and 50.50% for skill-only serving. Code is available at https://github.com/tianyi0216/Memcryst.git
1 Introduction
Lifelong agents must learn from expanding interaction histories while each decision uses bounded context; memory and skills each leave part of the task-solving burden unresolved. MEMCRYST learns memory and skills bidirectionally and adjusts retrieval influence from outcomes, reporting gains across diverse settings.
Motivation
- Memory supplies prior evidence but may leave procedures to infer, while reusable skills may omit task-specific facts and constraints needed for application.The section frames the challenge as learning from experience while adjusting which facts and skills enter later contexts.Source: §1 · p. 1
Approach
- MEMCRYST stores episodic records and typed facts, consolidates recurring episodes into conditional skills, and serves facts alongside skill procedures.Skill-guided interactions add memory for later revision; task outcomes adjust retrieval influence without rewriting record text, while the language model remains frozen.Source: §1 · pp. 1–2
Results
- Across ten settings, MEMCRYST leads seven reported comparisons; on ALFWorld it reaches 63.17% success, exceeding memory-only serving by 3.33 percentage points and skill-only serving by 12.67 points.A separate 2×2 intervention reports an observed +5.33-point interaction between fact and skill return.Source: §1 · p. 2
Contributions
- The contributions couple episode-based skill creation and revision with skill-guided behavior that supplies new memory, and separate evidence-based content updates from outcome-based retrieval updates.The evaluation spans task settings and interleaved deployment, testing joint serving, skill revision, and interaction between return channels.Source: §1 · p. 2
2 Related work
Related work addresses experience storage, reusable skills, context processing, and feedback-driven adaptation. MEMCRYST combines independently retrievable facts and episode-linked skills with outcome updates to records actually served.
Memory construction and retrieval
- Prior memory systems retain experience as insights, linked notes, or compressed evidence, whereas MEMCRYST keeps episode evidence for skill learning alongside independently retrievable typed facts.Examples include ExpeL, SAGE, and Dynamic Cheatsheet (Zhao et al., 2023; Suzgun et al., 2025), and A-Mem and TriMem (Xu et al., 2025; Sun et al., 2026).Source: §2 · p. 2
Skill construction and revision
- Skill systems build or revise procedures in different ways; MEMCRYST revises from new and supporting episodes while preserving skill identity and accumulated use statistics.Prior examples include Voyager and SkillWeaver (Wang et al., 2024a; Zheng et al., 2025a), and Agent Workflow Memory and Trace2Skill (Wang et al., 2024b; Ni et al., 2026).Source: §2 · p. 2
Context processing and consolidation
- Unlike systems that consolidate long inputs or update model parameters, MEMCRYST maintains external stores across deployment events with a frozen model.MemAgent and Multi-Head Recurrent Memory update textual memory (Yu et al., 2025; Li et al., 2026), while Sleep consolidates knowledge into parameters (Behrouz et al., 2026).Source: §2 · p. 2
Joint learning and outcome feedback
- MEMCRYST uses observed task outcomes to update only served records’ retrieval influence, while episode-based consolidation remains responsible for skill creation and revision.Unlike Live-Evo’s paired comparison (Yan et al., 2026; Zhang et al., 2026b), return uses observed outcomes; skill-guided interactions supply episodes for subsequent revision.Source: §2 · p. 3
3 Method
MEMCRYST adapts a frozen language model’s bounded context by maintaining episodic memory, typed facts, and conditional skills. Outcomes adjust future retrieval influence separately from evidence-based content updates.
3 Method
- The method links episode-based skill creation and revision with skill-guided behavior, whose interactions supply new memory for later learning.The cycle also uses outcomes to change later retrieval.Source: §3 · p. 3
3.1 Problem setup
- The agent processes ordered evidence and action or answer events using a frozen policy and external state, aiming to maximize expected prequential reward.Each event context fits the available token budget, and scored transitions include cold starts and later online errors.Source: §3.1 · p. 3
3.2 Context construction and online updates
- Context construction combines episodes, typed facts, and skills; retrieval filters and ranks eligible records under adapter-specific context limits.Episodes retain evidence and lessons, facts retain sourced entity claims, and skills store applicability conditions and parameterized procedures; exposure counts only records served to the actor.Source: §3.2 · p. 4
3.3 From episodic evidence to reusable skills
- At scheduled sleep boundaries, recurring episode clusters support conditional procedures with parameter slots and applicability conditions, which are audited against selected episodes.For matching capability keys, revision combines new and existing supporting episodes; accepted revisions preserve identity and accumulated utility while extending episode links.Source: §3.3 · p. 4
3.4 From skill-guided behavior to new memory
- Skill-guided behavior produces episodes containing evidence, outcome diagnoses, and lessons; memory writing also extracts typed facts for later retrieval and skill mining.Matching facts gain recurrence support and provenance while preserving their text; skills influence new memory through behavior rather than directly editing fact text.Source: §3.4 · pp. 4–5
3.5 Adapting future context through outcomes
- Outcome return updates retrieval influence for exposed facts and skills without rewriting content, while content updates handle memory writing and skill consolidation.Fact success scores are exposure-conditioned and do not estimate truth or individual causal contributions; updated scores later weight retrieval relevance.Source: §3.2 · p. 4, §3.5 · p. 5
4 Experimental setup
The evaluation covers ten settings across embodied control, long-document reading, conversation, mathematics, and code, using frozen language-model backbones and prequential scoring. Reported results vary by domain, with strong outcomes on several benchmarks and a mixed pattern in code.
Experimental setup
- The evaluation uses frozen Qwen3-8B as its main backbone and also tests Qwen3-1.7B and GPT-4o-mini on ALFWorld.The ten settings span five domains, with benchmark metrics including success rate, recall, token F1, exact match, and unit-test reward.Source: §4 · p. 5
Evaluation
- Prequential mean reward scores each task before its interaction updates external state and excludes standalone evidence-ingestion events.Table 1 reports percentages and changes from ReAct in percentage points; panel and overall means use the stated weighting scheme.Source: §4 · p. 5, Table 1 · p. 6
Embodied control and reading long documents
- MEMCRYST scored 63.17%, 64.70%, and 59.00%, with respective improvements of 11.67, 23.40, and 24.50 percentage points over ReAct.Source: §4 · p. 6, Table 1 · p. 6
Conversation and memory
- The MEMCRYST row reports scores of 31.75%, 22.20%, and 74.24%, with respective changes from ReAct of +31.02, +18.00, and +66.70 percentage points.Source: §4 · p. 6, Table 1 · p. 6
5 Results
Across ten settings, MEMCRYST leads seven comparisons, with results spanning ALFWorld serving, context selection, interleaved deployment, and multiple backbones. Results vary by domain, with strong conversation results and mixed code performance.
5 Results
- 52.26% Overall for MEMCRYST versus 39.92% for SimpleMem, the strongest baseline; MEMCRYST leads seven of ten settings.It leads ALFWorld and BABILong and ranks second to ExpeL on RULER.Source: §5 · p. 6
- 74.24% on name-substituted DialSim versus SimpleMem’s 47.85%, while ExpeL leads MBPP and CodeContests and MEMCRYST falls below ReAct on MBPP.The largest gains over ReAct occur in conversation memory, where MEMCRYST also exceeds SimpleMem on all three settings.Source: §5 · p. 6
- 14.17 percentage points with Qwen3-1.7B, 11.67 with Qwen3-8B, and 11.67 with GPT-4o-mini are the ALFWorld gains over ReAct.Each backbone remains frozen while its own external state is built from an empty start.Source: Table 3 · p. 7, §5 · p. 7
- 63.17% success with joint ALFWorld serving compares with 59.83% for memory-only and 50.50% for skill-only serving.These configurations learn from their own trajectories; skill-only serving retains internal memory for skill learning but withholds memory from the actor’s context.Source: Table 4 · p. 7, §5 · p. 7
- 44.50% mean performance versus 28.30% across 1,018 interleaved queries in five domains, 4.00 points below the specialist mean of 48.50%.The shared state exceeds separate specialists on BABILong and MBPP and retains improvements on both document slices and about 80% of the isolated LoCoMo gain.Source: §5 · p. 7
- 1.17 points come from continued skill revision over frozen admitted skill text (62.00%); after cycle 2, accepted updates revise existing skills.The 600-task stream records 154 accepted revisions, with all five final skills present by cycle 2.Source: §5 · pp. 7–8, Figure 2 · p. 7
- 75% success for MEMCRYST versus 58% with length-matched random records; episode replacement reaches 72% while using more context.Skill-based context uses about 62% fewer injected tokens and 29% fewer actor input tokens than episode replacement, without an established accuracy advantage over episodic context.Source: Figure 3 · p. 8, §5 · p. 8
- 3.50 points higher success results when both return channels are enabled rather than both disabled, with content construction and retrieval rules unchanged.The observed interaction is +5.33 points: skill return changes from −2.50 points without fact return to +2.83 points with it.Source: §5 · p. 8
6 Conclusion
MEMCRYST adapts a frozen LLM by learning evidence and procedures for its bounded context. Episodes support skill learning, while facts and skills guide behavior that supplies memory for later learning.
6 Conclusion
- Recurring episodes support skill creation and revision, while retrieved facts and learned skills jointly provide evidence and procedures in context.Skill-guided interactions then enter memory and support subsequent skill revision.Source: §6 · p. 8
- Task outcomes separately adjust which served facts and skills are favored in later retrieval.This changes future use without regenerating record text.Source: §6 · p. 8
- The paper concludes that bidirectional memory–skill learning can turn accumulated experience into useful context without updating model parameters.Across the evaluated settings, benefits are strongest in conversation and mixed in code.Source: §6 · pp. 8–9
Limitations
The stated limitations concern outcome attribution, feedback robustness, descriptive analyses, skill auditing, and the scope of interleaved evaluation.
Limitations
- Outcome return assigns one task outcome to every served fact and skill, so it cannot identify individual causal contributions or estimate factual truth.The method also relies on an observed success signal, and robustness to erroneous feedback remains untested.Source: Limitations · p. 9
- State and co-serving analyses are descriptive, and the LM-based skill audit does not guarantee that proposals are correct.Source: Limitations · p. 9
- Interleaved evaluation uses domain-scoped retrieval and does not establish transfer of learned skills to unseen domains.Source: Limitations · p. 9
Ethical Considerations
The study reports ethical risks of persistent memory and bounds its evidence to existing benchmarks; proposed deployment safeguards remain unvalidated.
- The study evaluates agents on existing benchmarks, with no human participants and no release of a new foundation model or scraped dataset.Source: Ethical Considerations · p. 9
- Persistent records can retain sensitive or false information, while repeated retrieval may amplify biases in stored content or outcome feedback.Source: Ethical Considerations · p. 9
- Deployments with user data call for separate stores, restricted access, retention and deletion controls, user review and contestation, and human review before consequential actions.These safeguards require separate validation.Source: Ethical Considerations · p. 9
- Benchmark results do not establish real-world safety.Source: Ethical Considerations · p. 9
A Formal and algorithmic details
The appendix formalizes how MEMCRYST stores episodes, facts, and skills, retrieves context, returns task outcomes to served records, and consolidates recurring episodes into skills. It specifies the online update order and analyzes the resulting outcome statistics and factorial interaction.
A.2 Record schemas and update ownership
- Episode records store task evidence, outcome diagnosis, and reusable lessons; facts and skills store claims and procedures with support, provenance, applicability, and scope fields.Identifiers, timestamps, and cached embeddings are stored but do not appear as evidence in the policy input.Source: §A.2 · p. 12
- Outcome return changes exposure and success counts for served facts and utility for served skills, without changing payloads, store membership, or episode weights.Memory writing and skill consolidation instead handle payload changes, support and provenance, skill admission or revision, and episode archiving.Source: §A.2 · p. 12
A.3 Full online algorithm and causal chronology
- Fact merging processes extracted facts sequentially, so later facts from the same event can match records inserted or updated earlier in that event.A match requires the same entity and scope and sufficient similarity; otherwise, the fact is appended with initial support and provenance.Source: §A.3 · p. 13
A.4 Skill mining, synthesis, and admission
- At sleep boundaries, recurring episodes are clustered and ranked; proposals synthesized from up to five high-weight episodes are audited, and accepted matches can revise existing skills.A proposal passes the first screen with at least 10 PASS verdicts among 13 checks; accepted revisions preserve the skill identity and utility while extending episode ancestry.Source: §A.4 · pp. 13–15
A.3 Full online algorithm and causal chronology
- At each event, the algorithm retrieves records for the frozen policy, returns outcomes to previously served records, writes new memory, and consolidates skills at scheduled sleep boundaries.Records added during an event do not receive that event’s outcome return, and updates affect later decisions because the action context is fixed before the outcome arrives.Source: §A.3 · p. 12, §A.4 · p. 14
A.5 Exact retrieval scores and exposure
- Retrieval filters records by scope and applicability before ranking; skills use exact or relaxed capability-key routing, while served context is bounded by adapter limits.The capability route does not fall back to global cosine retrieval, and only records represented in the assembled context receive outcome return.Source: §A.5 · pp. 15–17
A.6 Outcome return properties
- Fact scores are smoothed success estimates over exposed tasks, while skill utilities retain more weight on recent outcomes; neither statistic identifies an individual record’s causal contribution.The fact score is not factual truth, and adaptive retrieval or changing skills can alter which tasks expose a fact.Source: §A.6 · p. 17
A.7 Interpretation of the outcome-return factorial
- The outcome-return factorial shows a +5.33-point interaction; disabling fact return, skill return, or both lowers success by 6.00, 2.83, or 3.50 points, respectively, versus both enabled.All four cells use the same content-update algorithm and retrieval rules, but each run develops its own trajectories and state.Source: §A.7 · p. 17
B Additional results and analyses
The additional analyses examine deployment conditions, record reuse, and actor effort. On the same ALFWorld stream, the revisit guard is associated with higher success than running without it.
Additional analyses
- The analyses cover deployment conditions, learned-record reuse, and actor effort.Source: B Additional results and analyses · p. 17
ALFWorld navigation adaptation
- 63.17% success with the revisit guard versus 57.00% without it on the same 600-task ALFWorld stream.Both runs use frozen Qwen3-8B and a 30-action limit, with the navigation hint and other settings fixed.Source: B Additional results and analyses · p. 18
- The navigation hint and all other settings remain fixed in the revisit-guard comparison.The appendix describes the guard’s task-local navigation rule.Source: B Additional results and analyses · p. 18
B.1 ALFWorld performance across shuffled task orders
Across four shuffled ALFWorld orders, MEMCRYST averaged 61.08% success, with results ranging from 57.50% to 63.83%. The accompanying analyses examine frozen-state serving, benchmark comparisons, skill lifecycle, and name-substitution effects.
B.1 ALFWorld performance across shuffled task orders
- 61.08% mean success across four shuffled orders (57.50%–63.83%; SD 2.96 points), with the lowest run above fixed-order Reflexion (52.70%) and guarded ReAct (56.17%).The shuffled-order results come from four runs of 600 tasks each.Source: §B.1 · p. 18, Table 7 · p. 19
B.2 Terminal evaluation
- Terminal scores with the frozen final state are higher on ALFWorld, RULER, and MBPP, but lower on BABILong and LoCoMo than prequential scores.Table 8 reports held-out performance alongside the prequential results.Source: §B.2 · p. 18, Table 8 · p. 19
B.3 Frozen-state context controls
- Frozen-state MEMCRYST beat random selection in paired wins (24 vs. 7; p = .0033), while episode replacement was inconclusive (12 vs. 9; p = .664).The comparisons use the same learned state without writes or consolidation; mean injected context was 365 tokens for MEMCRYST, 369 for random selection, and 963 for episode replacement.Source: §B.3 · p. 18
B.4 Additional baselines and dialogue diagnostics
- On the common DialSim prefix, SimpleMem answered 457 of 955 questions correctly (47.85%).The metric excludes 200 session ingestion operations.Source: §B.4 · p. 19
B.5 Comparison with MSCE
- 63.17% ALFWorld success for MEMCRYST compares with 49.33% for MSCE and 56.17% for ReAct; on DialSim, MEMCRYST reaches 74.24%, versus 16.41% for MSCE and 7.54% for ReAct.On timed DialSim questions, accuracy is 97.0% for MEMCRYST and 3.2% for MSCE.Source: §B.5 · pp. 19–20, Table 10 · p. 20
B.6 State dynamics and skill lifecycle
- Across the ALFWorld stream, 223 of 367 terminal facts had degree at least one, forming 453 distinct edges to five final skill identities; consolidation recorded 159 accepted operations: five creations and 154 revisions.These edges indicate joint exposure, possibly to an earlier skill version, and describe joint context rather than synthesis provenance.Source: §B.6 · p. 20
B.7 Prospective intervention on name-substituted DialSim
- After DialSim character renaming, MEMCRYST’s advantage over ReAct grew from 47.0 to 66.7 points, while ReAct fell from 26.9% to 7.54%.The intervention’s three prespecified criteria were all met.Source: §B.7 · p. 21
B.8 Actor-call efficiency and an MBPP context case study
On ALFWorld, MEMCRYST improves success while using fewer actor calls than ReAct. The section also compares shared-success effort and the effect of episodic context on MBPP reward and actor steps.
B.8 Actor-call efficiency and an MBPP context case study
- Actor-effort measures exclude memory writes, synthesis, audit, and transport retries, so they do not represent total LLM cost.Retrieval quotas are configured limits, not measured token counts.Source: §B.8 · p. 21
- 63.17% success versus 51.50% for ReAct, with 15.22% fewer actor calls; MEMCRYST used 11,636 calls compared with ReAct’s 13,725.The call totals include action retries but exclude memory maintenance.Source: §B.8 · p. 22, Figure 6 · p. 23
- Among 250 tasks solved by both systems, mean actor calls fell from 12.90 to 10.13, a 21.49% reduction.MEMCRYST used fewer calls on 146 tasks, the same number on 41, and more on 63.Source: §B.8 · p. 22
- On the same 252 MBPP tasks, removing episodic context raised mean reward from 80.42% to 81.22% and reduced actor steps from 363 to 343.Both configurations learned online from their own trajectories and retrieved up to four facts and two skills.Source: §B.8 · p. 22, Figure 7 · p. 23
C.1 Default framework settings
- The default text encoder is all-MiniLM-L6-v2.Source: §C.1 · p. 23
C.2 Benchmark evaluation configuration
The evaluation configuration specifies shared comparison conditions, persistent-stream chronology, and benchmark-specific adapters. Additional passages describe generated-state checks, compute resources, and qualitative examples of memory and skill evolution.
C.2 Benchmark evaluation configuration
- Comparisons share the evaluator, answer or action interface, and backbone; the ten-setting, interleaved, and mechanism studies use frozen Qwen3-8B.The headline ALFWorld comparison pairs unguarded ReAct with guarded MEMCRYST, while component ablations share the task order and revisit guard.Source: §C.2 · p. 23
- The 1,088-event interleaved stream spans five domains; one evolving state uses domain stamps to restrict evidence and capability routing to select skills.Persistent runs start empty and score each item before writeback; standalone ingestion events contribute evidence but are unscored.Source: §C.2 · p. 24
- The ALFWorld adapter adds a task-local revisit guard and navigation hint, while the code adapter retrieves two skills and four sufficiently supported facts.Reader comparisons also differ in persistence: MEMCRYST retains one state across each fixed document sequence, while external readers rebuild stores for each document.Source: §C.2 · pp. 23–24
C.3 Generated state and parser contracts
- Generated episodes contain task evidence, diagnosis, and a reusable lesson; malformed records are rejected, and skill admission requires at least 10 PASS verdicts across 13 audit checks.The skill proposal is audited in a fresh context, and rejected proposals do not enter the catalog.Source: §C.3 · p. 25
C.4 Compute resources
- Qwen3-8B and Qwen3-1.7B were served locally on NVIDIA L40 GPUs; GPT-4o-mini experiments used the OpenAI API.Source: §C.4 · p. 25
D Qualitative examples of joint memory and skill evolution
- Selected task examples show retrieved memory in every actor input, with skills also included for ALFWorld, MATH-hard, and MBPP.The examples illustrate supplied evidence and recorded behavior but do not isolate individual records’ contributions.Source: D Qualitative examples of joint memory… · p. 26
D.1 Original memory records and skill snapshots
- Cleaning and heating episodes link different objects to persistent skills; the records also show skill snapshots, terminal use statistics, and fact provenance and co-serving links.Figure 10 shows procedure revisions under persistent identities; Figure 11 derives a fact score from saved used and helped counts, and Figure 12 records source task and co-served skills.Source: Figure 8 · p. 26, Figure 9 · p. 26, Figure 10 · p. 27
D.2 Served context on a successful held-out task
This section presents served-context examples across held-out tasks, showing retrieved skills and memory facts accompanying task-specific inputs and work. Examples include a compact cooling-skill context and task trajectories; some report reference-answer agreement, and the original MBPP submission passes the three provided tests.
D.2 Served context on a successful held-out task
- A 376-token context excerpt pairs a cooling skill with bread facts and records input and outcome counters, but no action transcript.Figure 13 identifies this as a frozen-state evaluation example.Source: Figure 13 · p. 28
D.3 Conversation memory and answer outcomes
- The conversation example shows conversation evidence and a completion-linked fact, with the dataset reference as the answer, but omits the actor’s context and response.The task record preserves the outcome.Source: Figure 14 · p. 28
D.4.1 ALFWorld
- In the ALFWorld trajectory, the actor turns on a desklamp, finds and picks up the bowl, across six calls with one skill and four facts retrieved.The supplied trajectory shows these intermediate actions and observations, not a final task outcome.Source: Call 2 B2: complete call-specific user… · p. 31, Call 4 B4: complete call-specific user… · p. 33, Call 5 B5: complete call-specific user… · p. 34
D.4.2 DialSim-subst.
- The DialSim task trajectory’s retrieved record inventory lists 1 actor call, 0 skills, and 12 facts; its complete prompt contains facts and conversation records without a skill, and its answer matches the reference.Source: §D.4.2 · p. 36, Figure 16 · p. 38
D.4.3 MATH-hard
- The MATH-hard context supplies one simplify-and-convert skill and four facts for a problem asking for the center of a circle.The provided passage gives the task and retrieved context, not the solution or outcome.Source: §D.4.3 · p. 39
- For the circle-center task, the served context included math-transformation guidance and circle constraints, and the complete actor response ended with the reference answer.The retrieved guidance covered expression analysis and simplification; the constraints stated that a circle equation can be transformed to standard form by rearranging and completing the square.Source: §D.4.3 · p. 39, Figure 17 · p. 40
D.4.4 MBPP
- MBPP serving supplied 2 skills, 4 facts, and 2 reference episodes; the original submission passed the three provided tests.The task was to write a Python function that finds the first repeated character in a string, with filtering and string-processing skills in the retrieved context.Source: §D.4.4 · p. 41, Figure 18 · p. 42