1jehuang / 1jehuang/jcode

[Bug] Automated todo assessment review creates endless loop after task completion

Open
#962 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

autonomous: no bug priority: high recurring-theme triage: needs-decision
Dominant language
Rust
Stars
19.9k
Forks
2.3k
Avg merge
2d 7h
Merged PRs (30d)
30

Description

Problem Description

During long-running sessions, the Jcode harness periodically injects an automated review prompt:

[automated todo assessment review - not a user message] Re-read the original request and reconsider the current todo plan and every goal assessment using the evidence gathered during the work so far. Correct anything stale or overstated... Do not reply conversationally or wait for the user. Continue the work after saving an honest updated assessment.

When all work and tests are already 100% completed, if the agent updates the todo tool in response to this prompt, the harness interprets the tool call activity as ongoing work and repeatedly re-injects the automated prompt. This creates an infinite loop where the agent cannot exit to present completion options or wait for user input, because the automated prompt explicitly instructs: "Do not reply conversationally or wait for the user."

Expected Behavior
  1. Once all items in the active plan/todo are completed (outcome_reached), the harness should stop injecting automated review prompts.
  2. The agent should be allowed to exit the loop, reply conversationally, and present final user options / wait for input per repository instructions (AGENTS.md).
Steps to Reproduce
  1. Execute a multi-step task in Jcode that triggers automated todo assessment review.
  2. Finish all tasks, run all tests, and mark all todo items as completed.
  3. Observe the harness continuing to inject the automated review prompt continuously, causing an endless loop.
Suggested Fix
  • Harness side: Suppress injecting automated todo assessment review when all tasks in the active plan are marked completed / outcome_reached.
  • System prompt / Instructions: Clarify that user-facing workflow rules (e.g. AGENTS.md option presentation / waiting for user input) override the automated todo review instruction once all work items are done.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the harness logic that injects the automated todo assessment review prompt and the active plan/todo completion state. Read AGENTS.md for the user-facing completion workflow, then reproduce a fully completed plan and verify that no further review prompt is injected and the agent can present final options or wait for input.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
ai, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.