All ideasMore in Work

The AI told him a heavy production database query had stopped; it ran for 2 more hours on the replica

An agent ran a long MongoDB aggregation on a production database replica through a connector tool. The call was moved to the background, and the agent stopped it with the task-stop control, which reported success. The agent told the user the query had been stopped. Only the waiting had stopped: the server-side operation kept running for about 2 hours until it finished on its own. Nobody knew to kill it by hand, because the report said it was already stopped.

This one went wrong. Read what happened so you don’t hit the same problem.

How it works

  1. Agent runs a heavy aggregation on a production replica
  2. The call is backgrounded
  3. Agent stops the task and gets a success result
  4. Tells the user the query is stopped
  5. The server-side operation keeps running about 2 hours
  6. It ends only by completing on its own

Why it’s worth knowing

The stop worked on the session’s side of the glass. The database, where the cost actually runs, never heard about it.

Where it’s from

Summarized from a public post on github.com. See the original ↗

Upgraded prompt

A ready-to-use prompt for this idea, built from research on what makes AI agents do the job right: who the AI should be, the exact steps, and a check to make sure it was done the way you wanted.

1Who the AI should be
2The prompt, with the steps
3The check when it’s done
Upgraded prompts are coming soon.

Try next

Every idea is a real post from someone who tried it, summarized in our words, with a link to the original. App names are swapped for plain words.