Agent mode stopping short of fully implementing #170088
-
Select Topic AreaQuestion Copilot Feature AreaCopilot Agent Mode BodyI have it very common that agent mode stops short of really implementing a class or small module, leaving in comments in the code like:
This is on humble objectives like converting a python class to rust and writing a parity test for it ― well not that simple, but you'd expect that converting code being rather benign for a code LLM, it will manage. What might be your thoughts about it? A wild thought of human hallucination might be that maybe if it didn't try to stop its work too early, it would have been able to push through during the same session. Or, it loses a lot of context (or blows up its own context by the details of its own work) between sessions on the same PR and loses focus (like a human) in forgetting its originally fair plan of implementation. This would be very manageable, unless after stopping at 20% of it on the first session, it would need to be reminded what to do next in a PR comment, and even on that smaller chunk of work given to it on a follow-up PR comment, it would still yield those "TODO" placeholders rather than fully implement. BTW, it often, though not always, claims it has implemented everything but then you see those placeholders and todos in the code. It also degrades in following the repo's |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
@matanox You’re not alone in noticing this — agent mode sometimes leaves behind “TODO” placeholders or partial implementations instead of fully finishing the task. This usually happens for a couple of reasons: Context window limitations: Guardrails by design: Session continuity: 👉 How to manage it: Break larger tasks into smaller steps (“first convert the class”, then “add the parity test”) instead of asking for everything at once. Remind it explicitly of earlier goals in the same PR thread (this helps it “regain focus”). If you see TODOs, you can prompt it directly like: “Please now replace the TODO with a full implementation.” This often makes it push past its safe stopping point. So in short: it’s not really hallucination as much as a mix of context limits + cautious defaults. With tighter prompts and follow-ups, you can usually get it to finish the work more reliably. |
Beta Was this translation helpful? Give feedback.
-
|
Does it really forget its initial plan of implementation as it's rewriting the PR comments and even its title as the PR trail of comments goes on and specializes towards solving issues with the implementation? Or does it somehow give its initial plan any kind of special context status while iterating new sessions? |
Beta Was this translation helpful? Give feedback.
@matanox You’re not alone in noticing this — agent mode sometimes leaves behind “TODO” placeholders or partial implementations instead of fully finishing the task. This usually happens for a couple of reasons:
Context window limitations:
The model can “lose track” of the broader plan if the code or discussion is long. It tries to stay safe by leaving TODOs instead of making incorrect assumptions.
Guardrails by design:
Copilot is tuned to prefer being cautious rather than generating incorrect/unsafe code. A placeholder signals “this part still needs human input” instead of silently pushing something broken.
Session continuity:
Since agent mode doesn’t truly remember across sessions, it may…