Skip to content

Give useful instructions

On this page

Tell the agent what you want to accomplish, where to look, and how to check the result. Suppose, for example, your app accepts a display name it should reject. A useful request includes the problem, the expected behavior, and the cases to test:

On the account page, saving an empty display name currently succeeds. Show a clear error beside the field instead. Check the existing validation, make the change, run the relevant tests, and try both an empty and a valid name in the app.

Give the agent context and boundaries

Point to relevant files, logs, screenshots, or Browser review comments. When you need the agent to use a secret, point to its location on the devbox instead of pasting its value into the conversation.

Say whether you want an investigation, a plan, or an implementation, and include constraints that could change the solution, such as an API that must stay compatible or a database schema that must not change. For instance, suppose searches in your app have been getting slower and you don't yet know why:

Find why the search endpoint gets slower as records accumulate. Trace the requests and record the evidence. Propose a fix before changing code; the current mobile client still needs to work with the API.

Be explicit about whether the task includes committing, pushing, deploying, or contacting someone.

Ask for checks you can review

For a code change, ask the agent to run relevant tests and report any failed or unavailable checks. For a change to appearance or interaction, also ask it to run your app and test the affected workflow.

If you want to try the result yourself, ask the agent to leave the development server running and tell you which port to open. Then select that devbox and open your app from the ports menu.

Save instructions for future work

There are two ways to save instructions you want to reuse. Repository agent instruction files, such as AGENTS.md for Codex or CLAUDE.md for Claude Code, keep coding conventions versioned alongside the code they describe. The project's Agent Guidance setting supplies shared instructions to both Codex and Claude on newly prepared devboxes, and changing it doesn't require a new snapshot:

  1. Open Project settings → Devbox lifecycle → New devbox defaults.
  2. Enter the instructions in Agent Guidance.
  3. Choose Save.

For example, a codebase with shared UI packages could save:

Use the shared form components in packages/ui for new forms. Keep validation messages beside the affected fields. Before adding a dependency, explain why the existing packages aren't enough.

boxes.dev will apply the saved guidance when it prepares a new devbox. Existing devboxes, running sessions, and Template box threads won't receive the change. Clearing and saving the field will remove older project guidance from subsequently created devboxes while preserving other instructions.

If a new devbox shows Agent guidance may be missing, ask the agent to check its instruction files for the guidance you expect. If it isn't there, give those instructions in the current thread; the devbox is still available to use.

Continue the task with the right context

Reply in the same thread for corrections or follow-up work that needs the conversation so far. Start a new thread on the same devbox when you want another conversation to use those files. Use Continue in new chat to explore a different approach while keeping the conversation through a chosen response.