> 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/common-mistakes-that-burn-credits.md).

# Common mistakes that burn credits

Most credit waste does not happen in one dramatic moment. It accumulates: a session that ran too long, a file read that was not needed, a model set one tier too high. Recognising the patterns is most of the fix.

## **The Core Explanation**

### **Letting a session run too long**

The most consistent source of unnecessary spend is using a single chat for multiple distinct tasks. Each exchange and each file read adds to the context. By the time you are three features deep, every message costs more than it did at the start, and response quality is lower because the window is carrying weight that is no longer relevant.

### **Asking the AI to read large files without a targeted question**

Complex nodes in a Sandbox Studio project can grow to over a thousand lines. Asking the AI to 'look at' one of these files with a vague question may cause it to read the whole thing. That is a large token cost for a question that often only needed thirty lines of context.

Ask about a specific behaviour, not a whole system. 'How does this node handle collision on death' pulls a small slice. 'Look at the enemy node' can pull the entire file.

### **Asking the AI to read auto-generated files**

Sandbox Studio projects contain auto-generated files produced by the build pipeline: class registries, serialised property metadata, and similar outputs. These files are large, dense, and not written for AI consumption. They are outputs, not references.

If the AI reads one of these files trying to understand class registration or property configuration, those tokens are wasted. The correct reference is the engine source. If you see the AI pulling in a generated file, redirect it.

### **Opening a scene file in the AI context**

Scene files are large serialised documents. If one enters the AI context, the token cost is immediate and significant. The scene editor manages these files. The AI has no productive use for them in standard development tasks.

{% hint style="danger" %}
*WARNING: A scene file entering the AI context is one of the most reliable ways to consume a large portion of your context window in a single action. Avoid it unconditionally.*
{% endhint %}

### **Doing a broad project search when a targeted one would do**

Asking the AI to 'look at the whole project' or 'understand how this works across the codebase' can cause it to read dozens of files before it answers your question. A targeted search on a specific folder or file produces the same useful output at a fraction of the cost.

### **Building something the engine or project already contains**

Sandbox Studio ships with significant built-in functionality: UI widgets, multiplayer replication, the property system, movement patterns, and more. Asking the AI to build something without first checking whether it already exists is a common and expensive mistake.

You spend credits on implementation, discover the system exists, then potentially spend more credits reconciling the two. Checking costs one message. Rebuilding costs a session.

### **Using a powerful model for mechanical work**

If you have a plan and the implementation is straightforward, a lighter model handles it. Using the most powerful model to write a component that follows a pattern already in the project is paying for reasoning capacity you are not using. Upper tier models earn their cost when the problem is genuinely hard. Mechanical implementation is not a hard problem.

## **Practical Guidance**

* Start a new chat for each distinct task. A session covering multiple features pays compounding context costs.
* Ask targeted questions about specific behaviours, not broad questions about whole files.
* Never ask the AI to read auto-generated files. Redirect to the engine source.
* Keep scene files out of the AI context entirely. If the AI is about to open one, stop it.
* Give the AI a specific directory or file to search, not the whole project.
* Check whether the engine or project already has what you need before asking the AI to build it. One message. Always worth it.
* Match the model to the task. Save the upper tier for problems that have resisted the lower ones.

## **Common Mistakes**

| Mistake                                                             | What to do instead                                                                      |
| ------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| Running one long session across multiple features                   | One session per task; start a new chat at each task boundary                            |
| Asking the AI to 'look at' a large file with no specific question   | Name the specific behaviour you want to understand                                      |
| The AI reading auto-generated build output files                    | Redirect to the engine source; generated files contain no useful development context    |
| A scene file entering the AI context                                | Stop it immediately; scene files are managed by the scene editor                        |
| Asking the AI to search the whole project for a pattern             | Point it to the specific folder or file most likely to contain the answer               |
| Building a system before checking if it already exists              | Always ask 'does this exist?' first; one message                                        |
| Using the most powerful model for implementation once a plan exists | Drop to a lighter model for execution; reserve the upper tier for problems that need it |


---

# 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/common-mistakes-that-burn-credits.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.
