Skip to content
I found a prompt that keeps AI agents from taking tasks too far

I found a prompt that keeps AI agents from taking tasks too far

The new ChatGPT “superapp” boasts many powerful features, including the ability to organize the mess of files on your desktop PC. Of course, the idea of letting ChatGPT loose on your precious data may give you pause—and if it does, I don’t blame you.

Sure, you can give ChatGPT Work (the new desktop agent for ChatGPT) or Claude Cowork detailed instructions on how it should handle your files, and both ChatGPT and Claude can do their work in sandboxes, which gives them a safety net in case things go sideways.

But it can still be hard to predict what an AI might do in the heat of the moment, particularly when it comes to how—and when—they’ll decide they’re actually finished with the task you’ve handed them.

Here’s where a key facet of AI prompting comes into play. One handy way to keep ChatGPT, Claude, or Gemini from taking a potentially destructive command too far is to carefully describe your desired outcome.

Or put another way, you can make the AI define what “done” means for a given task. This whole “define done” concept isn’t new. It’s a popular prompting concept that helps the AI to stay on course and avoid giving you a rude surprise at the end.

Many different versions of the “define done” prompt exist. I took the bones of one such prompt and honed it with the help of GPT 5.6 Sol (the model that powers ChatGPT Work) and Claude Opus 5, going back and forth until the prompt was working the way I expected.

Here’s the prompt:

Before you start, give this task a clear finish line. Keep it brief and proportional to the size of the job.

**Result:** What will be true when the task is finished.

**What you’ll produce:** The specific thing you’ll make or change.

**How I’ll know:** Something I can inspect, test, count, or otherwise verify for myself.

**Not part of done:** Related work you might notice but will leave alone.

**Open questions:** Anything ambiguous that would change what “done” means. If there are none, write “none.”

Use the smallest complete version of my request. Avoid vague goals like “improve” or “optimize.”

Then stop. Do not begin work in the same reply — wait for my go-ahead. Once I approve, stop as soon as the check passes. If you notice anything else, list it separately under “Not part of this task,” but don’t act on it unless I ask.

And here’s a more compact and portable version:

Before you start, give this task a finish line: the result, what you’ll produce, how I can check it, what you’ll leave alone, and any open questions — write “none” if there are none. Then stop and wait for my go-ahead; don’t begin in the same reply. Once I approve, stop as soon as the check passes and list anything else you noticed without acting on it.

A key addition I made to the prompt was the “stop and approve” part at the end, ensuring that the AI doesn’t gallop ahead without giving you the chance to check the plan and make changes.

I tried this prompt on a desktop folder that I’d populated (with Claude’s help) with a few dozen dummy files and directories, including a mix of phony work and personal files.

I pointed ChatGPT at the test directory (dialing the model back to the mid-range GPT-5.6 Terra version) and gave it the prompt “Can you organize the files in this directory,” with the “define done” prompt pasted directly after.

Here’s the response I got:

Result: Every file is in a clear category folder, with no loose files at the directory root.

What you’ll produce: A reorganized folder structure using the existing Work, Personal, Downloads, and old stuff areas plus any necessary category folders; filenames remain unchanged.

How I’ll know: The root contains only category folders, and all 53 files are still present.

Not part of done: Renaming files, deduplicating versions, reading or editing document contents, deleting files, or reorganizing files inside existing subfolders unless needed to remove root-level clutter.

Open questions: Should I create a separate category for sensitive financial/tax/legal records, or keep them within Personal and Work?

I asked ChatGPT to create a separate “sensitive” directory (by the way, I don’t recommend giving ChatGPT or Claude access to your personal tax returns or financial statements), and it came back with:

Got it — sensitive financial, tax, legal, insurance, and identity documents will go in a separate category. Reply “go ahead” when you want me to start.

I gave ChatGPT a final nod, and about a minute later, boom—it was done, with my test files neatly organized on my desktop, exactly as expected.

The “define done” prompt pairs nicely with other ChatGPT Work and Claude Cowork tasks, such as renaming screenshots or similar desktop duties where the AI is actually manipulating your files.

Again, the key feature here is the ability to tweak ChatGPT’s definition of “done” until it’s just the way you like it—and if you’re not happy with the direction, you can always back up and start over.

Source link