You put a human review on each iteration of an Agno Loop. The reviewer rejects iteration 1 and picks retry. You call continue_run. The run comes back completed, and none of your loop steps ran again. In a related case, your step returned 0, and after the reject the next iteration gets the original input and None instead. This guide shows why both happen, reproduces them, and gives two workarounds that passed 30 of 30 runs without patching agno.
Everything below ran on agno 3.2.1 (the latest release) and agno main at 9a5bdbe (version string 3.3, unreleased), sqlalchemy 2.1.9, Python 3.13.5, Linux, Nov 28, 2026. The steps were executor functions only: no model and no API key. Each run used a fresh SQLite file. Each row below is 30 runs, in one pass.
The reporter used Windows 11, Python 3.12 and agno main at f600606, a commit after 3.2.1. We did not test that exact commit; its workflow.py is byte-identical to 3.2.1's, so the resume code is the same.
Who this hits
Bug 1, the retry that never runs, hits you if all of these are true:
- You use a
Loopwithhuman_review=HumanReview(requires_iteration_review=True, on_reject=OnReject.retry). - The loop body has more than one step.
- You resume with the non-streaming
continue_runoracontinue_run.
Bug 2, the lost falsy value, hits you if your loop also has forward_iteration_output=True and the last step of an iteration returns 0, False or []. It happened with a one-step loop too.
The issue
This is agno-agi/agno#11849, "[Bug] Loop iteration review retry skips a multi-step loop and drops a falsy forwarded result". It was opened Nov 24, 2026 (UTC) and was still open on Nov 28, 2026, with the label bug and 0 comments.
The reporter points at the code itself: "The in-code comment next to the resume index already says the grouping assumes single-step iterations." On the second bug: "The continue path uses if last_iter_output.content ... so 0, False, and [] are skipped."
The reporter wrote that they will fix it and open a PR, and asked that the issue be left with them so it is not picked up twice. As of Nov 28, 2026 we found no fix PR. We searched open and closed PRs for the issue number, the author, resume_from_iteration, loop_previous_results, "iteration review", and loop or iteration in titles. Nothing touched this code path.
The issue says it is separate from #9955, which is about the streaming path never applying the resume index. #9955 is also still open. This guide covers the non-streaming path only.
The latest release, v3.2.1 (Nov 17, 2026), and main checked on Nov 28, 2026 have the same resume code.
Why it happens
When a loop iteration needs review, Loop.execute pauses and returns one StepOutput. Its steps field is a flat list of every step output from every finished iteration. For a two-step loop, that is two outputs per iteration.
On continue_run after a reject with retry, agno 3.2.1 does this (agno/workflow/workflow.py, sync path; the async path has the same code):
if run_response.step_results:
paused_output = run_response.step_results[-1]
if isinstance(paused_output, StepOutput) and paused_output.steps:
kwargs["loop_resume_from_iteration"] = len(paused_output.steps)
# Note: this assumes single-step iterations (wraps each StepOutput
# in its own list). Multi-step loop iterations would need grouping.
kwargs["loop_previous_results"] = [[s] for s in paused_output.steps]
len(paused_output.steps) counts step outputs, not iterations. Take the issue's setup: two steps, max_iterations=2. After iteration 1 the loop pauses with two step outputs, so the resume index is 2. The loop then checks while iteration < self.max_iterations, which is 2 < 2. That is false, so the loop body never runs. The run ends with status completed, and nothing re-ran.
The second bug is a few lines later, where the resume forwards the last iteration's output into the loop:
prev_results = kwargs["loop_previous_results"]
if prev_results and prev_results[-1]:
last_iter_output = prev_results[-1][-1]
if hasattr(last_iter_output, "content") and last_iter_output.content:
step_input.previous_step_content = last_iter_output.content
step_input.input = last_iter_output.content
last_iter_output.content is a truthiness check. 0, False and [] fail it, so nothing is forwarded. The next iteration gets the original workflow input and previous_step_content of None. The same check appears in four places in workflow.py.
Reproduce it
This is the issue's setup, trimmed from our suite.py. Each step records what it received:
from agno.db.sqlite import SqliteDb
from agno.workflow import Loop, OnReject
from agno.workflow.step import Step
from agno.workflow.types import HumanReview, StepInput, StepOutput
from agno.workflow.workflow import Workflow
calls = []
def step_a(si: StepInput) -> StepOutput:
calls.append(("a", si.input, si.previous_step_content)); return StepOutput(content="a-out")
def step_b(si: StepInput) -> StepOutput:
calls.append(("b", si.input, si.previous_step_content)); return StepOutput(content="b-done")
review = HumanReview(requires_iteration_review=True, on_reject=OnReject.retry)
wf = Workflow(name="wretry2", db=SqliteDb(db_file="t.db"), steps=[Loop(
name="refine",
steps=[Step(name="a", executor=step_a), Step(name="b", executor=step_b)],
max_iterations=2, forward_iteration_output=True, human_review=review)])
run = wf.run("go") # pauses after iteration 1
run.steps_requiring_output_review[0].reject()
run2 = wf.continue_run(run)
A pass means: after the reject, a and b both run again, and a receives b's output, "b-done". On agno 3.2.1 as is, a sample run recorded these calls:
first: [('a', 'go', None), ('b', 'go', 'a-out')] status paused
after reject: [] status completed
For bug 2, the falsy scenarios use a one-step loop with max_iterations=3 whose step returns 0, False or []. A pass means the next call's previous_step_content is that value, with the same type. As is, the call after the reject got ('go', None).
We also ran a script built from the issue's configuration (step a returns 0, step b returns "b-done", call recording added) on agno 3.2.1. Its output for the two cases:
A two-step loop first: RunStatus.paused [('a', 'go', None), ('b', 0)] | after reject: RunStatus.completed []
C falsy 0 calls after reject: [('go', None)]
Results
30 runs per row, one pass, Nov 28, 2026. "main" is 9a5bdbe.
| agno | Variant | Scenario | Path | Pass |
|---|---|---|---|---|
| 3.2.1 | As is | Two-step retry | sync / async | 0/30 / 0/30 (no step re-ran; status completed) |
| main | As is | Two-step retry | sync | 0/30 |
| 3.2.1 | As is | Falsy 0 | sync / async | 0/30 / 0/30 (got ('go', None)) |
| 3.2.1 | As is | Falsy False / [] | sync | 0/30 / 0/30 |
| main | As is | Falsy 0 | sync | 0/30 |
| 3.2.1 | Workaround: one executor per iteration | Retry | sync | 30/30 |
| main | Workaround: one executor per iteration | Retry | sync | 30/30 |
| 3.2.1 | Workaround: wrap the value, {"value": 0} | Falsy | sync | 30/30 |
| main | Workaround: wrap the value | Falsy | sync | 30/30 |
| 3.2.1 | Trap: a and b inside an agno Steps container |
Retry | sync | 0/30 |
| main | Trap: Steps container |
Retry | sync | 0/30 |
| 3.2.1 | Full patch (the issue's fix) | Two-step retry | sync / async | 30/30 / 30/30 |
| 3.2.1 | Full patch | Falsy 0 | sync / async | 30/30 / 30/30 |
| 3.2.1 | Full patch | Falsy False / [] | sync | 30/30 / 30/30 |
| 3.2.1 | Half patch: grouping only | Two-step retry / falsy 0 | sync | 30/30 / 0/30 |
| 3.2.1 | Half patch: is not None only |
Two-step retry / falsy 0 | sync | 0/30 / 30/30 |
After continue_run, the retry rows end completed: that was iteration 2 of 2, with no further review. The falsy rows end paused at the next iteration review, 2 of 3. Both are expected.
The Steps container is a trap. Grouping a and b in one agno Steps container inside the loop looks like the obvious fix, and both steps do re-run after the reject. But a receives the string "Steps body completed with 2 results" instead of "b-done". The run reports completed. If your first step reads the previous draft, it now reads a summary string.
Each half patch fixes only its own bug. The grouping change alone fixed the retry (30/30) but not the falsy value (0/30). The is not None change alone did the opposite. You need both.
The fix: two app-side workarounds (no library change)
1. Make each loop iteration one Step
Put both parts of an iteration into one executor function, and call your two functions in order inside it. The loop then has one step, so one step output per iteration, and the resume index counts iterations correctly.
def draft(text):
... # your first part (was step a)
return "a-out"
def check(text):
... # your second part (was step b)
return "b-done"
def iteration(si: StepInput) -> StepOutput:
# On a retry, si.input and si.previous_step_content hold the last iteration's output.
out = check(draft(si.input))
return StepOutput(content=out)
loop = Loop(
name="refine",
steps=[Step(name="ab", executor=iteration)],
max_iterations=2,
forward_iteration_output=True,
human_review=HumanReview(requires_iteration_review=True, on_reject=OnReject.retry),
)
After the reject, both parts ran again and the first part received "b-done" in 30 of 30 runs on agno 3.2.1 and 30 of 30 on main.
The cost: agno now stores one step record per iteration instead of two. If you relied on separate step records, or on separate agents for each part, you lose that split.
2. Never return a bare falsy value from the last step
Wrap the value in a dict:
def score(si: StepInput) -> StepOutput:
prev = si.previous_step_content # None on the first iteration
last = prev["value"] if prev else None
...
return StepOutput(content={"value": 0}) # not StepOutput(content=0)
A dict with a key is truthy, so the resume forwards it. After the reject, the next call received {'value': 0} in 30 of 30 runs on agno 3.2.1 and 30 of 30 on main. Read it back as previous_step_content["value"].
You need both workarounds only if you have both cases. A one-step loop that never returns 0, False or [] is not affected by either bug.
Stuck on an Agno workflow review or resume flow? Send a minimal repro; you pay $79 only when our patch passes it.
Option: patch agno
If you would rather fix the library, the issue proposes two changes. We applied them to copies of agno 3.2.1 with make_patched.py.
The grouping change replaces the two resume lines. It groups the step outputs by the number of steps in the loop, and resumes from the number of finished iterations. It replaced 2 places, the sync and async copies:
# PATCH 11849: group completed step outputs by iteration (len(loop.steps) per iteration)
_lp = self.steps[paused_step_index] if isinstance(self.steps, list) and paused_step_index < len(self.steps) else None
_n = max(1, len(_lp.steps)) if isinstance(_lp, Loop) and _lp.steps else 1
_g = [list(paused_output.steps[_i:_i + _n]) for _i in range(0, len(paused_output.steps), _n)]
kwargs["loop_resume_from_iteration"] = len(_g)
kwargs["loop_previous_results"] = _g
The falsy change is one line, in 4 places:
-if hasattr(last_iter_output, "content") and last_iter_output.content:
+if hasattr(last_iter_output, "content") and last_iter_output.content is not None:
With both changes, the two-step retry and falsy 0 passed 30 of 30, sync and async, and falsy False and [] passed 30 of 30 (sync).
Cautions:
- Grouping by
len(loop.steps)assumes each step inside the loop returns oneStepOutput. We did not test aCondition,Router,Parallelor nestedLoopinside the loop body. If an inner step returns a list, the grouping would be wrong. - It edits installed library code, so any reinstall or upgrade undoes it silently. Pin agno, and keep a test like ours that rejects one iteration and checks what the next one receives.
- The reporter said they will open their own PR. If it is merged, it may differ from this patch.
What we didn't test
- The streaming continue path, the one #9955 covers.
- Postgres or any database other than SQLite.
- Agent or team steps with real models.
- Loops with
Condition,RouterorParallelinside. end_condition.on_rejectvalues other than retry, andrejection_feedback.- Continuing through AgentOS or the API.
- Windows, and the issue's exact commit f600606.
- More than one pass. Each row ran 30 times, once.
FAQ
Why does Agno continue_run after a reject finish without re-running the loop?
Because of issue #11849, open as of Nov 28, 2026. On resume, agno sets the resume index to len(paused_output.steps), which counts step outputs, not iterations. A loop with two steps and max_iterations=2 pauses after iteration 1 with two step outputs, so it resumes at iteration 2. The check 2 < 2 is false, so the loop body never runs and the run reports completed. In our tests no step re-ran in 30 of 30 runs on agno 3.2.1, sync and async, and on main.
Why does a Loop step that returns 0 arrive as None after a reject?
The resume path forwards the last iteration's output only if last_iter_output.content is truthy. 0, False and [] fail that check, so the next iteration gets the original workflow input and previous_step_content None. In our tests that happened in 30 of 30 runs for 0, False and [] on agno 3.2.1, and for 0 on main.
Is the Agno Loop reject retry bug fixed in the latest release?
No. Issue #11849 was open on Nov 28, 2026, and we found no fix PR. The latest release, v3.2.1 (Nov 17, 2026), and main at 9a5bdbe checked on Nov 28, 2026 have the same resume code, and both passed 0 of 30 runs in our tests. The reporter wrote that they will open a PR.
How do I work around it without patching agno?
For the retry bug, make each loop iteration one Step: one executor function that calls your two parts in order. For the falsy bug, never return a bare 0, False or [] from the last step of an iteration. Return StepOutput(content={'value': 0}) and read previous_step_content['value']. Each workaround passed 30 of 30 runs on agno 3.2.1 and on main 9a5bdbe.
Does wrapping the loop body in an agno Steps container fix it?
No, it is a trap. With both steps inside one Steps container, both re-ran after the reject, but the first step received the string Steps body completed with 2 results instead of the second step's output. It passed 0 of 30 on agno 3.2.1 and on main, and the run still reported completed.
Is the one-line is not None change enough?
No. It fixes only the falsy bug. With only the is not None change, falsy 0 passed 30 of 30, but the two-step retry passed 0 of 30. With only the grouping change, the retry passed 30 of 30 and falsy 0 passed 0 of 30. Both changes together, as the issue proposes, passed 30 of 30 sync and async on agno 3.2.1, and also for False and [].
Related
- CrewAI human_feedback: resume skips your listeners
- LangGraph multiple interrupts: how to resume each one
- OpenAI Agents SDK tool approval and resume
- Deep Agents async subagent: second question never shown
There is no Agno template on the site yet. You can browse the templates index. Human-in-the-loop approval graph is a tested LangGraph starter, not Agno.
Stuck on an Agno workflow review or resume flow? Send a minimal repro; you pay $79 only when our patch passes it.