1jehuang / 1jehuang/jcode

Incomplete-todo nudge repeats every turn with no backoff, even when the agent is blocked on await_members

Open
#793 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Summary

The end-of-turn reminder You have N incomplete todos. Continue working, or update the todo tool. repeats on every single turn with no backoff and no awareness of whether the agent is actually able to make progress. When a coordinator is legitimately blocked waiting on background swarm workers, this fires indefinitely.

Observed

In one session today it fired ~25 times in ~12 minutes, in unbroken succession, while the coordinator was blocked on swarm await_members waiting for a worker to finish a browser scrape. The two remaining todos were:

  1. assigned to a running worker, with a wake already registered via await_members
  2. explicitly waiting on a human decision

Neither could be advanced by the model. Each nudge still consumed a full turn: the model either re-polled swarm list (pure token burn, no new information) or emitted "still waiting" prose. That was hundreds of thousands of tokens of pure overhead, and it crowds the transcript so real worker reports are harder to spot.

Why it's wrong in this case

The harness already knows the coordinator is blocked — await_members / bg wait registered a wake, and the session is in a waiting state. Nudging an agent to "continue working" when it has explicitly parked on a wake is asking it to do the one thing that cannot help.

Suggested fixes (any one would fix the pathology)
  • Suppress while a wake is registered. If the session has an outstanding await_members / bg wait / ScheduleWakeup, skip the nudge — that's the strongest signal that waiting is intentional.
  • Exponential backoff. Turn 1, then 2, 4, 8… rather than every turn.
  • Ownership awareness. If every incomplete todo is delegated (or the session has live owned workers), suppress or soften to an informational line.
  • Cap per session. Stop after N consecutive nudges with no change in todo state; resume only when the todo list actually changes.
Contrast with a user-side gate

For reference, a pre_tool discipline gate in my own config gets this right: it counts only actionable tool calls (bash/write/edit/multiedit/apply_patch), blocks once, and resets its counter so it cannot deadlock. The built-in turn-end nudge has neither the actionable-only filter nor the block-once/reset behaviour.

Environment

jcode v0.67.1 (88a19f38e), macOS aarch64. Coordinator session with 5 spawned swarm workers; [display] pin_todos = true.

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

Trace the end-of-turn incomplete-todo nudge and its interaction with await_members, bg wait, and ScheduleWakeup. Reproduce a coordinator blocked on a registered wake with delegated or human-blocked todos, then verify the chosen suppression, backoff, or cap behavior prevents repeated nudges while preserving useful reminders after todo state changes.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.