onlook icon indicating copy to clipboard operation
onlook copied to clipboard

[bug] AI response cancels on its own

Open electrikjesus opened this issue 5 months ago • 5 comments

I have imported an Onlook desktop created project into Onlook web, and was able to do a few things using the chat interface (update page themes, and start work on pulling an API), but eventually, the responses started to cancel themselves, leaving only my initial request in the chat. Some times, this even broke things in the site because the AI canceled making changes and left things unfinished. This has cost me at least 50 chat credits in asking it to fix what it started. I even tried to ask the AI to track the progress it was making so it could catch up with the work it left half completed, but it still starts a response, makes a few changes, and then stops eventually. Leaving me with only my initial prompt in the chat, back at square 1, asking it to fix it's mistakes, and tell it where to look, and how to find them.

I also mentioned this bug here: https://github.com/onlook-dev/onlook/issues/2570#issuecomment-3146682035

In my opinion, if Onlook starts a project, change, feature, etc., it should be able to run npm run build after the initial changes are complete. Otherwise, that change should be considered incomplete.

One of the changes added to the project in question actually helps Onlook validate that any change it makes did not break anything. The plan was to run this after a group of steps to make a change or add a feature is complete. It has worked for other projects, so I thought I should share it here.

run-build.js

const { spawn } = require("child_process");
const fs = require("fs");

const build = spawn("bun", ["run", "build"], {
  stdio: ["inherit", "pipe", "pipe"]
});

let output = "";
let errorOutput = "";

build.stdout.on("data", (data) => {
  const text = data.toString();
  console.log(text);
  output += text;
});

build.stderr.on("data", (data) => {
  const text = data.toString();
  console.error(text);
  errorOutput += text;
});

build.on("close", (code) => {
  const fullOutput = output + errorOutput;
  fs.writeFileSync("./build.log", fullOutput);
  console.log(`Build process exited with code ${code}`);
  console.log("Output written to build.log");
});

electrikjesus avatar Aug 02 '25 20:08 electrikjesus

@http-teapot , seems like this type of cancellation bypasses the message limit revert logic?

@electrikjesus for reference, we just added a feature a few days ago to revert message count when the chat errors out. Trying to debug why this fails in your case. When it errors, does the chat show anything?

Kitenite avatar Aug 03 '25 17:08 Kitenite

Not really. For the majority of cases, it will start to show a response, then it acts like it reaches a buffer limit somewhere and just cancels it's response, leaving only the message I started with

electrikjesus avatar Aug 03 '25 18:08 electrikjesus

I just got this too after like 20 toolcalls chained together trying to install shadcn. It did succeed in getting the work done, but erased the output in the chat and I didn't know it was done. Had to ask the AI what was up and it said everything was installed.

drfarrell avatar Aug 07 '25 03:08 drfarrell

Facing the same issue here

yunusj avatar Sep 11 '25 11:09 yunusj

One quirk I have noticed with this issue, is that if I notice my browser locking up on the webpage as Onlook is "thinking" , and I click on a different element in the designer, it seems to help bring it out of that Page Unresponsive state and the AI wheels start spinning again in the chat window

electrikjesus avatar Sep 13 '25 23:09 electrikjesus