t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: "Implement" plan button incorrectly re-submits text input from previous clarifying question

Open quentinleon opened this issue 8 months ago • 3 comments

Before submitting

  • [x] I searched existing issues and did not find a duplicate.
  • [x] I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

  1. Instruct the agent to create a plan that involves asking for user input (e.g., "Write a plan to write something to a test.txt file and ask me for input as to what to write. Just a few options like A, B, C.").
  2. The agent responds with a "Questions" prompt, presenting multiple-choice options and a text input field.
  3. Instead of selecting an option, type a custom response into the text input field (e.g., "write hello world").
  4. Click the Submit answers button.
  5. The agent successfully uses the input to generate a plan (titled "Plan: Test File Write Plan").
  6. A "PLAN READY" section appears at the bottom with a blank input field for feedback and an Implement button.
  7. Leave the feedback input field blank and click the Implement button.

Expected behavior

Clicking "Implement" with a blank feedback field should cause the agent to immediately begin executing the generated plan.

Actual behavior

When the "Implement" button is clicked, the text previously entered in step 3 ("write hello world") is automatically submitted as a new user message. The system incorrectly treats this replayed text as feedback on the plan, causing the agent to respond to the redundant input rather than executing the plan.

Impact

Major degradation or frequent failure

Version or commit

0.0.15

Environment

Windows 11

Logs or stack traces


Screenshots, recordings, or supporting files

plan-user-input-replay.mp4

Workaround

No response

quentinleon avatar Mar 31 '26 01:03 quentinleon

Still an issue in 0.0.17

quentinleon avatar Apr 11 '26 21:04 quentinleon

Have had this issue twice today on 0.0.20.

I think this was introduced by 1310045629f6613b2fd3e9b82e2e371495e0ca2a.

In the original plan/user-input commit, pending custom answers already wrote into promptRef.current, but the plan follow-up submit path used the visible React draft state via prompt.trim(). So the stale promptRef value was not used to decide whether the blank plan feedback field meant “Implement” or “Refine”.

Commit 1310045629f6613b2fd3e9b82e2e371495e0ca2a changed submit handling to derive text from promptRef.current. At that point, the stale custom-answer value became observable: pending input still writes into promptRef.current, while the visible editor switches back to the normal draft prompt after pending input ends.

st0vik avatar Apr 17 '26 18:04 st0vik

Question answers and plan feedback now use separate per-thread draft state, and the implementation action does not read the prior custom-answer buffer. This stale prompt-ref path has been removed.

This was closed as part of a large repo-wide maintenance sweep. If you think it's still relevant, please reopen.

juliusmarminge avatar Jun 20 '26 00:06 juliusmarminge