> For the complete documentation index, see [llms.txt](https://studio-docs.sandbox.game/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://studio-docs.sandbox.game/working-efficiently-with-ai/editing-and-refining-prompts-vs.-re-prompting.md).

# Editing and refining prompts vs. re-prompting

When an AI misunderstands you, you have three options: send a follow-up, edit the original message, or start a new chat. These are not interchangeable. Each produces a different result, carries a different cost, and suits a different situation.

## **The Core Explanation**

### **The three moves and what they actually do**

Editing a previous message in Cursor does more than fix your wording. Cursor discards everything that came after it and re-runs the conversation from that point. The AI has no memory of the responses that were cut. This is a partial reset: more targeted than starting a new chat, but with a genuine context cost. Use it when you want to correct a misframed question before the AI has built too much on top of it.

Sending a follow-up message adds to the existing conversation. The AI can see your original prompt, its response, and your refinement. This works well for small corrections and missing detail. It works poorly when the AI has already gone confidently in the wrong direction, because it will try to reconcile your correction with what it produced rather than replacing it. The result is a patch, not a rethink.

Starting a new chat gives you a clean slate. The AI carries nothing forward except what you explicitly give it in the opening message. This is the right move when the approach is wrong, not just the output.

### **When to refine with a follow-up message**

Refinement works when the AI understood the task but missed something specific. You asked for a pickup system and it gave you one, but it did not make it interact with the inventory. A follow-up that adds that requirement is fast and the AI can slot it in without revisiting everything. The same applies when the output is close but imprecise: the AI produced a working Component but used hardcoded values where you wanted configurable properties. One targeted follow-up is more efficient than re-doing the whole prompt.

### **When to edit a previous message**

Edit when you framed the original request badly and the AI has not yet done much with it. If the AI’s response shows it interpreted you in entirely the wrong direction, editing before the session builds further on that misunderstanding saves you from patching a foundation that was never right.

In Cursor, editing is also useful when a broad prompt pulled in unnecessary context and caused the AI to read files you did not need. Editing lets you reframe the request cleanly without the token cost of everything that followed.

Be deliberate about what you are discarding when you edit. If the AI produced something useful after the message you want to change, that work is gone. Either copy it out first or reconsider whether editing is actually the right move.

### **When to re-prompt in a new chat**

Re-prompt when the approach is wrong, not just the output. If the AI has built a system using patterns that conflict with the Sandbox Studio architecture (monolithic code where behaviours should be modular, direct scene manipulation instead of SceneNode classes, custom class registrations that should use @ENGINE.GameClass()), a correction message will rarely fix it cleanly. The AI will patch what it wrote. The result carries the shape of the original mistake.

A prompt written with the architectural requirement explicit from the first message produces a better result than six rounds of correction in a degraded session. Re-prompt also when the session has gone on long enough that the AI is carrying too much history.

### **The Sandbox Studio dimension**

Sandbox Studio has specific, non-negotiable patterns. SceneNodes, the World, the property serialisation system, the multiplayer replication model: none of these are flexible. When a prompt fails to specify which system the AI should work within, the AI will make a choice, and it may make the wrong one.

Prompt refinement handles the case where the AI used the right system but missed a detail. Re-prompting handles the case where it chose the wrong system entirely. If the AI writes a standalone class when you needed a SceneNode, or registers a game class as EngineClass instead of GameClass, a follow-up correction often produces code that looks right but carries the original structural mistake. Starting again with the target class, the system, and the expected pattern named explicitly is faster.

The specificity of your opening prompt directly determines how much you will need to refine. Name the system, the class type, the expected behaviour, and the Sandbox Studio pattern you are following. Vague prompts produce responses that need either multiple refinements or a full restart.

{% hint style="info" %}
*NOTE: If you are working in a specific Sandbox Studio subsystem (multiplayer, the UI kit, asset packs), say so at the start of the prompt. The AI uses that signal to load the right context and avoid applying patterns from a different system.*
{% endhint %}

## **Practical Guidance**

* If the task is right but a detail is missing, send a follow-up. Keep it specific. One correction per message where possible.If the original question was framed badly, edit it. Do this before the AI has built significantly on top of it, and copy out anything useful before you edit.
* If the AI chose the wrong approach or wrong engine system, start a new chat. A better prompt with explicit architecture requirements will outperform rounds of correction every time.
* Front-load Sandbox Studio context in every prompt. Name the class type (`SceneNode`, `GameClass`), the system you are working in, and the behaviour you expect. This reduces the need for refinement before the AI has started.
* If you find yourself sending more than two correction messages in a row, stop. That is the signal that refinement is not the right tool. Write a better opening prompt in a new session.
* Use Cursor's message-edit to fix framing problems early. Use follow-up messages for detail. Use a new chat for direction changes.

{% hint style="info" %}
*TIP: Before sending any prompt, ask yourself: does the AI have enough information to make the right Sandbox Studio architecture choice without guessing? If not, add it to the prompt rather than planning to correct it afterwards.*
{% endhint %}

## **Common Mistakes**

| Mistake                                                                  | What to do instead                                                                                |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------- |
| Sending correction after correction when the AI's approach is wrong      | Recognise that the direction is off, not just the detail. Start a new chat with a clearer prompt. |
| Editing a message after the AI has built significant work on top of it   | Copy anything useful out first; or use a follow-up if the work is mostly sound                    |
| Writing vague opening prompts and relying on follow-ups to fill the gaps | Specify the Sandbox Studio system, class type, and pattern in the first message                   |
| Correcting an architecture mistake with a follow-up message              | Restart — patched architecture usually carries the original mistake through to the final code     |
| Treating all three moves (edit, follow-up, new chat) as equivalent       | They have different token costs and different results. Choose deliberately.                       |

Refinement is for filling gaps. Editing is for fixing framing before it compounds. Re-prompting is for changing direction. The faster you can identify which one you actually need, the less time you spend correcting work that was never going to land correctly.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://studio-docs.sandbox.game/working-efficiently-with-ai/editing-and-refining-prompts-vs.-re-prompting.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
