Skip to content

Ask, Code and roles ​

The message box has two modes, Ask and Code. Under each mode is a role: the instructions, tools, knowledge sources and MCP connections the agent gets.

Ask ​

Ask answers questions about the repository and changes nothing.

  • The agent has three tools: view, grep and glob. It reads only files inside the repository. Symbolic links that point outside it are refused.
  • No terminal, no file editing, no external MCP tools.
  • Answers cite file paths.
  • No verification runs. The verification box shows "Unverified" with "Ask is read-only; no change validation ran this turn."
  • A turn stops after 15 minutes at most.

Use Ask to learn a codebase, find where something happens, or plan a change before you spend a Code turn on it. The suggestion "Explain this repository's structure" on a new task starts an Ask turn.

Code ​

Code makes the change you describe.

  • The agent has a terminal and a file editor inside the sandbox. It can read and edit files and run commands, as a non-root user, with no network access.
  • It is told to keep unrelated behaviour unchanged and to explain the verification result.
  • A test command found in the repository runs before and after the change. See Verification.
  • The result is a diff you review. Nothing reaches GitHub until you click "Create draft PR".
  • A turn stops after 60 minutes at most.

Good Code requests are specific. Say what should change and what must stay the same, for example "Rename UserRepo to UserStore across the package. Don't change the public API of api/."

The suggestions "Fix a problem" and "Add tests" on a new task start Code turns.

Switching modes in a session ​

Each turn picks its own mode. A common pattern is an Ask turn to understand the code, then a Code turn for the change, then another Ask turn to check something in the result. An Ask turn after a Code turn sees the session's changes so far.

A draft pull request can only be created or updated from a Code turn, so the latest turn has to be a successful Code turn when you publish.

Roles ​

Every organization has these roles:

RoleUsed byWhat it doesTools
askAsk modeAnswers questions about the repository and cites file pathsview, grep, glob
codeCode modeMakes the requested change and explains the verification resultterminal, file editor
refactorEarlier task APIRefactors while keeping behaviour, makes focused changes, runs the project's validationterminal, file editor
rewriteEarlier task APIImplements a behaviour change, explains compatibility changes, validates old and new behaviourterminal, file editor
testEarlier task APIImproves test coverage without changing production behaviourterminal, file editor
reviewEarlier task APIReviews code and returns findings with file references, without changing filesnone (read-only)

The message box uses only ask and code. The other four come from the earlier task-based workflow and stay available to it. They aren't offered as choices in the chat.

Changing a role ​

Owners and administrators can change a role in "Settings" under "Role templates". Saving a role with an existing name publishes a new version. Turns that already started keep the version they started with. New turns use the latest version.

A role version sets:

  • "Role instructions", added to every request.
  • "Tools (comma-separated)", the agent's built-in tools.
  • "Knowledge sources", searched at the start of each turn (see Knowledge base).
  • "Custom tool connections", MCP tools the agent may call (see MCP tools).
  • "Read-only role (view, grep and glob only)".

The ask role must stay read-only, with no tools beyond view, grep and glob and no MCP connections. The code role must not be read-only. If either rule is broken, new turns in that mode are refused until an administrator fixes the role.

Read-only roles never get external MCP tools.

Memory per role ​

Project memory is kept per project and per role. Ask turns read the ask role's published memory, Code turns the code role's. See Memory.