Skip to content
Home
Docs/AI providers, models & keys

AI providers, models & keys

PocketCode's AI is bring-your-own-key: you connect your own account with OpenAI, Google Gemini, Anthropic Claude, GitHub Copilot or any OpenAI-compatible server, and the app talks to it straight from your phone. PocketCode adds no AI fee and no AI quota. This page covers every AI setting: keys and sign-ins, models, tuning, MCP servers, tool permissions, secrets and privacy. Using the AI (the chat, Swarmcode, Cortex, AI Office) has its own pages.

What it is and how to open it

All the AI configuration lives in one place: open Settings and go to the AI section. Nothing in it needs a plan, and nothing in it is a PocketCode AI subscription: you connect your own accounts and the app talks to them directly. These are the rows, in the order the app shows them.

RowWhat it does
Model per taskPin a provider and a model for each background task (SQL, code analysis, workflow and design generation, snippets), or let the app choose.
Visible modelsChoose which models appear in the chat's model picker.
API KeysAdd, check, replace and remove your provider keys and sign-ins. Asks for your fingerprint, face or screen lock first.
Per-provider tuningTemperature, output limit and reasoning, one set per provider. No fingerprint prompt: these values aren't secrets.
AI Tool PermissionsRestrict which tools each provider or model may call.
MCP ServersConnect your own tool servers (Model Context Protocol).
SecretsTokens and keys the assistant can use without ever seeing them.
Auto suggestionsShow AI suggestions while you type. On by default; it needs Code completion.
AI titlesName conversations with the model. Off by default; the row shows the estimated tokens each title costs.
Code completionAutocomplete code with AI. On by default.
Cortex: things at onceHow many agents Cortex may run at the same time: 1 to 4, 2 by default.
Contextual helpExplain selected code. On by default; with it off, the editor's Explain action answers “Contextual explanations are disabled”.
Zero-egress (no network AI)Blocks every AI call that leaves the device. See Privacy and security.
SwarmcodeSettings of the multi-agent mode. Opening the sheet is free; running Swarmcode is Pro, with 2 free runs.

Shortcuts from the chat

  • In an empty chat with no provider, the card No AI service configured has a Set up AI services button that opens the key list.
  • In the chat's model picker, a provider without a key shows Add your key and Tap to add it; tapping it opens that provider's row.
  • Both shortcuts open the key sheet straight away, without the fingerprint prompt. The prompt only guards the API Keys row in Settings.
The fingerprint prompt. Tapping API Keys in Settings asks you to verify your identity first (“Authenticate to access your API keys”) with your fingerprint, face or screen lock. If the phone has no screen lock at all, the sheet opens without asking, because refusing would leave you unable to add your first key. If there is a lock but the prompt isn't available, you get “Set up a screen lock or biometric to access API keys.”

Screen map

Every screen, sheet and dialog of the AI settings, and how you reach it:

ScreenHow you get thereWhat you can do
Settings → AIOpen Settings and choose the AI section.Fourteen rows: the sheets below, switches for Auto suggestions, AI titles, Code completion, Contextual help and Zero-egress (no network AI), and the Cortex: things at once selector.
API KeysRow API Keys (fingerprint, face or screen lock first), or from the chat.See the five AI providers and the GitHub (git ops) token with their status (Configured, Not configured), open one, or tap Usage and settings on a configured row.
Key view of OpenAI, Google Gemini, Anthropic ClaudeTap the provider's row.Two steps, Get your key and Paste it here, then Check & save. Afterwards Your key: Check now, Replace key, Remove key from this device.
ChatGPT loginOpenAI row, second tab.Accept OpenAI's terms, sign in to your ChatGPT account in the browser, sign out. Needs a paid ChatGPT plan.
GitHub Device FlowGitHub Copilot row.Sign in with GitHub with a short code, Open verification page, Cancel sign-in, sign out. Needs a paid Copilot plan.
Custom endpointCustom endpoint row (or its saved endpoints).Pick OpenRouter, Groq, DeepSeek and others, or LM Studio, Ollama and Tailscale on your computer; paste a key, edit the Base URL, Test connection, save several endpoints.
Usage and settingsButton on a configured row of the key list.One scrolling sheet: Provider quota, Recorded usage, Diagnosis and Settings.
Per-provider tuningRow Per-provider tuning (no fingerprint prompt).The same Settings block as above, with a chip per provider.
Model per taskRow Model per task.Automatic or Manual, and a pinned provider and model for five background tasks.
Visible modelsRow Visible models.Hide models from the chat's picker, All / None per provider, Refresh models, Show all again.
Model picker of the chatTap the model name in the chat header.Tabs Recent, Favorites, All, global search, reasoning effort. Described in AI Chat; the model list is covered here.
AI Tool PermissionsRow AI Tool Permissions.Allow or deny tools per provider or per model, Auto-approve categories, ask before acting outside the device.
MCP ServersRow MCP Servers; Add opens the form.Add, switch on and off and delete servers; read each one's status and last error; confirm before a new server runs.
SecretsRow Secrets.Add, edit and delete named secrets and the hosts they may be sent to. The values are never shown again.
SwarmcodeRow Swarmcode.Pick the Intensity and the Budget per run, switch the second opinion from another provider, and tap Apply changes.
Send to …?The first time you send something to a provider.Allow or cancel sending your message, code and attachments to that provider.
Nothing leaves this deviceA card in the empty chat while Zero-egress (no network AI) is on.See the setting to turn it off.

Providers and how you sign in

PocketCode has five kinds of provider. Four are named services; the fifth, Custom endpoint, is any server that speaks the OpenAI API. The API Keys sheet lists them in that order and adds a sixth row, GitHub (git ops), under Git Operations. That one isn't AI: it holds the token the app's Git client uses to push, pull and clone, and the AI chat never uses it. Each row says Configured or Not configured.

ProviderHow you sign inWhat you need
OpenAIPaste an API key (tab API key, the recommended one) or sign in with your ChatGPT account (tab ChatGPT login).An OpenAI API key with credit, which OpenAI bills per token; or a paid ChatGPT plan that includes Codex (Plus, Pro, Team or Enterprise), used through the Codex CLI bundled in the app. ChatGPT login only runs on 64-bit ARM phones.
Google GeminiPaste an API key. There is no sign-in.A key from Google AI Studio (aistudio.google.com/apikey). AI Studio has a free tier whose limits Google sets.
Anthropic ClaudePaste an API key. There is no sign-in.A key from console.anthropic.com/settings/keys; it starts with sk-ant-. Anthropic bills it per token to your account.
GitHub CopilotSign in with GitHub (GitHub Device Flow).A paid GitHub Copilot subscription (Pro, Business or Enterprise). You get the models your plan includes, billed by GitHub.
Custom endpointPick a provider from a list, or type a URL, and paste its key.Any server that speaks the OpenAI API: OpenRouter, Groq, DeepSeek and more than 170 others, or Ollama and LM Studio on your own computer. The key is optional only for local servers.
PocketCode is not a middleman: once connected, requests go from your phone straight to the provider (Copilot through the language server bundled in the app, ChatGPT login through the bundled Codex CLI). Details under Privacy and security.

Add a key (OpenAI, Gemini, Claude)

  1. 1Open Settings → AI → API Keys and tap the provider's row. For OpenAI, stay on the API key tab.
  2. 2Step 1, Get your key. The app tells you where to create it and what it starts with (OpenAI: platform.openai.com/api-keys, Gemini: aistudio.google.com/apikey, Claude: console.anthropic.com/settings/keys). The link under it opens that page.
  3. 3Step 2, Paste it here. Paste the key into the field, or use Paste from clipboard. The app cleans what you paste (spaces, quotes, Bearer , NAME=value, JSON) and tells you at once if the format looks wrong, for example a Claude key in the OpenAI field.
  4. 4Tap Check & save. The app sends one small request to the provider to check the key, then saves it. Keys the provider rejects are never saved.

What “Check & save” does

The provider…What happens
Accepts the keyIt is saved and the sheet notes Works, with when it was checked and how long the request took.
Rejects the keyIt is not saved. You stay on the form with “OpenAI rejected this key. Check it and try again.” (with the provider's name).
Can't be reachedNo connection, a timeout, or Zero-egress on: the key is saved, marked Not checked yet, with “Could not check the OpenAI key; it will be used anyway.”

Your key: check, replace, remove

Once a key is saved, tapping the row shows Your key: a fingerprint of the key (its first characters and last four, never the whole thing), when it was last checked and the result.

You can

  • Check now repeats the check. A rejected key shows “OpenAI rejected this key. Replace it to keep using OpenAI.”
  • Replace key takes you back to the two steps.
  • Remove key from this device deletes it from the phone: “The chat stops using OpenAI until you add a key again.” A link to the provider's site lets you revoke the key there for real.
  • Usage and settings, on any configured row, opens quota, usage, diagnosis and tuning.
  • Saving a new key makes the model picker ask the provider for its list again.

You can't, and why

  • Save a key the provider rejects, or one whose format can't be right (for example an Anthropic admin key, sk-ant-admin…: “This is an admin key; chat needs a regular API key.”).By design
  • See a saved key again: only its fingerprint is shown.By design
  • Take a screenshot of the key sheet or see it in the recent-apps preview: the sheet blocks both.By design
  • Close the sheet while a key is being checked.By design
  • Sync keys to a PocketCode server: there isn't one. The app says “Your key stays on-device — nothing synced to our backend”.By design

OpenAI with your ChatGPT account

The OpenAI row has two tabs: API key (the recommended one, it works with any account) and ChatGPT login. The second signs you in to your own ChatGPT account and spends your ChatGPT subscription instead of an API bill. Under the hood the app runs OpenAI's Codex CLI, bundled in the app: every OpenAI turn goes through it, and the model list is whatever Codex accepts for your account. The picker labels that section OpenAI · via Codex.

You can

  • Tap Start ChatGPT sign-in. A terms dialog comes first (Sign in with ChatGPT): read OpenAI's terms, tick the box and tap Accept & continue. You are only asked once.
  • Approve in the browser that opens (“Waiting for you to authorise on ChatGPT…”) and come back to the app. Open sign-in page again and Cancel sign-in are there if you need them.
  • Once connected, the row says Configured and Sign out of ChatGPT removes the session from the phone.
  • Usage and settings shows your ChatGPT plan, the account and the Codex limits the account reports.

You can't, and why

  • Use it with a free ChatGPT account or one without Codex: “Your ChatGPT account doesn't include Codex. You need a paid plan (Plus, Pro, Team or Enterprise) to use Codex.”Third party
  • Use it on a phone that isn't 64-bit ARM (emulators, Chromebooks): the Codex binary is only bundled for arm64-v8a. Use an OpenAI API key there.Device
  • Run models Codex refuses for your account: the picker still lists them with Not available on your plan, and picking one answers “Codex won't run … with your ChatGPT account.”Third party
  • Let Codex edit files or run commands on its own: its own write and shell tools are switched off, so only PocketCode's tools run, through the same permission gate.By design
  • Attach images: with ChatGPT login the turn goes to Codex as text.By design

GitHub Copilot

The GitHub Copilot row has a single method, GitHub Device Flow. You need an active paid Copilot subscription: you get the models your plan includes, billed by GitHub. The app talks to Copilot through the Copilot language server bundled in the app.

You can

  • Tap Sign in with GitHub: a short code appears in large type (tap it to copy it) with a countdown, “Code expires in …”.
  • Tap Open verification page (github.com/login/device), enter the code and approve. The app waits (“Waiting for you to authorise on GitHub…”) and checks from your phone, even if you leave the app to approve. Cancel sign-in stops it.
  • When it's connected the row says Configured, and Sign out of GitHub Copilot removes it.
  • Choose the model in the chat's model picker: the list comes live from the Copilot language server for your account. Preferred category (Fast, Balanced, Powerful) is in the tuning sheet.

You can't, and why

  • Use Copilot without a paid GitHub Copilot subscription.Third party
  • Attach images: Copilot turns are text only.By design
  • Use it while Zero-egress (no network AI) is on: the language server doesn't start.By design

Gemini, and the retired Google sign-in

Gemini works with an API key only. Google ended Gemini CLI sign-in with a Google account for individual accounts (free, AI Pro and AI Ultra) on 18 June 2026, so an AI Studio key is the way in, and AI Studio offers free keys with limits set by Google. If an earlier version of PocketCode had saved a Google sign-in for you, the Gemini row says Google sign-in retired — add an API key: open it, read the notice and tap Remove old Google sign-in, or just save a Gemini key, which clears it.

You can

  • Get a key at aistudio.google.com/apikey and add it like any other key.
  • Remove a leftover Google sign-in with Remove old Google sign-in.

You can't, and why

  • Create a new Google sign-in for Gemini: “Google ended Gemini CLI sign-in for individual accounts on 18 June 2026, so it no longer works.”Third party
The sixth row, GitHub (git ops), takes a classic or fine-grained personal access token (Personal Access Token) for the Git client: “Push, pull, clone — not used by the AI chat”. It follows the same paste-and-check flow, and the AI chat never reads it.

Cost, quota and BYOK

PocketCode has no AI plan: you pay your provider (or nothing, with a local model), and the app adds no fee, no credits and no message limit of its own.

  • Bring your own key. Every provider on this page is free to connect on the Free plan, with no limit on keys or endpoints.
  • Who bills you. With an API key, the provider bills your account (OpenAI and Claude per token; Gemini's AI Studio has a free tier whose limits Google sets). With ChatGPT login the use is charged against your ChatGPT subscription quota. Copilot uses the models in your Copilot plan, billed by GitHub. A local server costs nothing.
  • No included quota. PocketCode never counts or limits your AI messages. The only numbers it shows are the ones providers return: Provider quota and Recorded usage in Usage and settings.
  • Limits are the provider's. Rate limits, free tiers and prices belong to each provider and can change without the app changing.
Several agents mean several requests: Swarmcode and Cortex spend more of your provider's tokens than a normal chat turn, and the tokens come from your key. In Swarmcode settings, Budget per run caps a run.

Models

Which models you can use depends on your keys. You choose the model in the chat's model picker; the settings on this page decide what the picker shows and which model the background tasks use.

Where the model list comes from

  • With an API key, the app asks the provider for its own model list, so a new model appears as soon as the provider publishes it. The app keeps the newest version of each model family and folds older ones under Show N older versions; OpenAI shows chat models only.
  • Remote catalogue. The app also reads a small manifest PocketCode hosts (pocketcodeapp.com/models.json) with names, descriptions, output limits and reasoning and vision flags, so a new model can be added without an app release. It is refreshed every 6 hours, the last good copy is kept for when you're offline, and a built-in list is the last resort.
  • ChatGPT login: the models Codex accepts for your account. Copilot: the live list from the Copilot language server for your account. Custom endpoint: the endpoint's own /v1/models.
  • A provider without a key shows Add your key · Tap to add it in the picker.
The manifest dated 12 August 2026 has nine entries, seven different models (Claude 3, Gemini 2, OpenAI 2; Copilot's two repeat OpenAI's). It is a catalogue of names and limits, not the list of everything you can run: with a key, the provider's own list decides.

The chat's model picker

Tap the model name in the chat header. It opens on Recent if you have recent models, otherwise on All.

  • Recent (the last 5 models you sent a turn with), Favorites (tap the star on a model) and All (one section per connected provider, and one per saved custom endpoint).
  • Search all models looks in every provider at once.
  • Each row shows the model, its id and context window, and chips Vision, Reasoning and Free. Free appears only for ids ending in :free, OpenRouter's convention for models without cost: it does not mean free in PocketCode.
  • Refresh models reloads a provider's list; retired models are dimmed with (retired); models that reason get a Reasoning effort selector (Off, Low, Medium, High).
  • Choosing a model of a saved custom endpoint switches the chat to that endpoint. Add a custom endpoint (LM Studio, Ollama, OpenRouter…) sits at the bottom.

You can't, and why

  • Read Free as free of charge in PocketCode: it only mirrors OpenRouter's :free suffix.By design
  • See a model you hid in Settings: hidden models are skipped, except the one in use.By design
How to use the picker and the rest of the chat is covered in AI Chat

Visible models

Settings → AI → Visible models (“Tidy the chat model picker”) lists the models grouped by provider.

You can

  • Switch a model off to hide it from the picker; the counter shows “N of M”.
  • All and None switch a whole provider at once.
  • Search inside a provider that has 10 or more models.
  • Refresh models reloads the lists; Show all again (N hidden) undoes everything.

You can't, and why

  • Block a model: “Hiding does not block a model — it only tidies the list.” A background task pinned to a hidden model still works. To restrict what a model can do, use AI Tool Permissions.​By design
  • Hide the model you are using: it always stays in the picker.By design

Model per task

Background AI tasks, the ones that aren't the chat, choose their own model. Settings → AI → Model per task has two levels: a global mode and a pin per task.

ModeWhat the app does
AutomaticPicks a connected provider (your chat's provider if it's connected) and a model that suits the task, a fast one for SQL or snippets, a reasoning one for code analysis. It's a local rule: no extra AI call. It is the default.
ManualMirrors your chat's provider and model. If that provider isn't usable, the task fails with a clear message instead of switching provider behind your back.

You can

  • Choose the global mode, Automatic or Manual (table below).
  • Pin a provider and model for each of five tasks: SQL assistant, Code analysis, Workflow generation, Design generation and Snippet generation. A pinned task shows its provider and model; Default follows the global mode.
  • A pin wins over the global mode as long as its provider is connected; if it isn't, the task falls back to the mode.
  • With no provider connected the sheet says “Connect an AI provider first to pin a model.”

You can't, and why

  • Change the chat's model here: the chat uses its own selection, and this page only governs background tasks.By design
  • Pin the general-purpose task: it exists in the app but has no row.By design

Custom endpoint

Custom endpoint connects any server that speaks the OpenAI API; the row's tagline is “OpenRouter, Groq, DeepSeek, Ollama and 170+ more”. The sheet shows one step at a time: choose, then configure.

  1. 1Open Settings → AI → API Keys → Custom endpoint.
  2. 2Choose. Pick a provider from Cloud providers, or one of the three shortcuts under On your computer. Search provider lists every OpenAI-compatible provider the public models.dev catalogue has a base URL for (170+, a live list, not a fixed number). Already-connected ones are under Connected.
  3. 3Configure. The chosen provider and its key: Change goes back, then the API key field. Advanced settings shows the Base URL, already filled in and editable for your own server.
  4. 4Tap Test connection to try it without saving anything: it asks the endpoint for its model list and measures the delay. Then Connect (or Save when editing).

On your computer and in the cloud

ShortcutHow it connects
LM Studiohttp://127.0.0.1:1234/v1. Plug the phone into the computer by USB and run adb reverse tcp:1234 tcp:1234 on the computer.
Ollamahttp://127.0.0.1:11434/v1. It works as it is if Ollama runs on this phone. If it runs on your computer, run adb reverse tcp:11434 tcp:11434 on it.
Tailscale (HTTPS)Your own https://….ts.net/v1 address. On the computer run tailscale serve --bg 1234 (1234 is LM Studio, 11434 is Ollama), then paste the address it prints, adding /v1.

Cloud providers shows ten popular services with their URLs already filled in: OpenRouter, Groq, DeepSeek, Together AI, Mistral, xAI, Cerebras, Fireworks AI, DeepInfra and Perplexity.

Keys, several endpoints and models

The API key is optional only for local servers: localhost and loopback addresses, 0.0.0.0, private network addresses, .local names and the Tailscale network (*.ts.net). For anything else the sheet asks “Enter the API key”.

You can

  • Save several endpoints and switch between them from the chat: each saved endpoint is its own section in the model picker. As soon as you have one saved, the Custom endpoint row is replaced by one row per endpoint plus Add a provider.
  • Edit a saved endpoint: leave the key empty to keep the current one (“A key is already saved. Leave this empty to keep it.”).
  • Remove endpoint from this device deletes it after a confirmation.
  • The model is chosen in the chat's model picker, not on this sheet.

You can't, and why

  • Use plain http:// towards anything but localhost, 127.0.0.1 or 10.0.2.2 (the emulator's address): Android blocks unencrypted traffic so your key and code never cross a shared Wi-Fi in the clear. A LAN address such as http://192.168.1.50 counts as local for the optional key and is still blocked. Use HTTPS (Tailscale Serve) or USB with adb reverse.​By design
  • Add providers that publish no base URL or don't speak the OpenAI protocol: they aren't in the list.Third party
  • Choose the model on this sheet.By design

Usage, diagnosis and tuning

Two sheets tune a provider. Usage and settings is the full view; Per-provider tuning is a shortcut to its last block that doesn't ask for your fingerprint.

Usage and settings

BlockWhat it shows
HeaderThe provider's name and tagline; with ChatGPT login, your ChatGPT plan and the account's email, read from the sign-in stored on your phone.
Provider quotaBars for each limit window the provider reports (“Canonical data the provider reports (we don't estimate anything)”). Providers that report nothing show No provider data yet and “Send a message so the provider returns its counters.”
Recorded usageWhat PocketCode recorded on this device from the token counts each provider returned: turns, input, output, cache read and write, cache hit rate and Top models. “We only count the tokens each provider returns in its responses. For your real quota, check the provider dashboard.”
Diagnosis“Find out why this provider is not answering”, in three levels (below).
SettingsThe tuning controls (below). Changes apply from the next turn you send with that provider.

Periods of recorded usage

ProviderChips
API keys (OpenAI, Gemini, Claude, Custom)Today, 7 days, 30 days, All
OpenAI with ChatGPT loginLast 3h, Today, This week, All
GitHub CopilotThis month, All

Diagnosis

Each level includes the ones before it and stops at the first serious failure, so it never spends tokens when a free check has already found the problem.

LevelWhat it does
Free“No network, no key used”: checks the shape of the key, that a model is selected and that not every tool is denied.
Check the key“Authenticates. Does not generate”: also asks the provider for its model list and checks that the model you selected is still in it.
Full test“A real reply. Spends tokens”: sends a real chat request.

What the sheet can and can't do

It is one sheet you scroll, not tabs.

You can

  • See where a provider's quota stands, where the provider reports one, and what the app recorded locally.
  • Run a diagnosis when a provider stops answering.
  • Edit the provider's settings without leaving the sheet.

You can't, and why

  • See a quota the provider doesn't give: only ChatGPT login and Copilot read it from account endpoints those services don't document (they may change without notice), and Claude shows windows only when its responses carry them. Gemini, OpenAI with an API key and Custom endpoints have none.Third party
  • See the Codex quota on a free ChatGPT plan: “Your ChatGPT Free plan doesn't expose Codex usage limits — only paid plans (Plus, Pro, Team, Enterprise) do.”Third party
  • Treat recorded usage as a bill: it counts only tokens the providers returned, on this device.By design

Per-provider tuning

Settings → AI → Per-provider tuning has a strip of five chips (OpenAI, Gemini, Claude, Copilot, Custom). Anything you don't touch keeps the provider's default, and Reset puts a control back. The sheet only offers the controls each provider has.

ControlWhat it doesFor
TemperatureSlider from 0.00 to 2.00 (shows 0.70 until you move it).All
Max tokensOutput limit, in steps of 512 from 512 up to the active model's own limit.All
Thinking budgetOff, Low, Medium or High: 0, 1,024, 4,096 and 16,384 tokens.Claude
Reasoning effort (o-series)low, medium or high.OpenAI, Custom
See real reasoning (Responses API)Uses OpenAI's Responses API to show the model's reasoning. Not offered for custom servers, which rarely implement it.OpenAI with a key
Frequency penalty, Presence penaltyFrom −2.0 to 2.0.OpenAI, Custom
Top-K, Top-PTop-K from 1 to 100 (shows 40), Top-P from 0 to 1 (shows 0.95).Gemini
Preferred categoryFast, Balanced or Powerful.Copilot
MCP toolsWhether your MCP servers' tools are offered to this provider. On by default.All
Max agentic roundsHow many tool rounds a turn may take: steps of 5 up to 100; 0 shows ∞ and means no cap, which is the default.All
  • Set Max tokens above the active model's limit, or tune a parameter the provider doesn't have.By design

MCP servers

Settings → AI → MCP Servers connects external tool servers through the Model Context Protocol. Their tools are offered to the model alongside PocketCode's own, with Claude, Gemini, OpenAI, Custom endpoints and Copilot, named <server id>__<tool>. Servers are programs that run on your phone, through the Node.js runtime bundled in the app.

Add and manage servers

The sheet is empty at first: “No MCP servers yet. Tap “Add” to connect one — e.g. node /sdcard/mcp/server.js.”

You can

  • Tap Add and fill in ID (lowercase letters, digits and _; it can't change later), Display name, Command (node), Arguments (the first one is the script's path) and Environment variables (one KEY=value per line, saved encrypted).
  • Before a new server runs you see This server will run on your phone: “We are about to run … with the same permissions as PocketCode. If you do not recognise it, cancel and check it first.” Tap Run it; if you cancel, nothing is saved. A server runs when you save it, and again each time you switch it on.
  • Each server shows its state: Idle, Starting…, Running · N tools, Failed (with the last error in red) or Disabled. A switch turns it on and off, and the bin deletes it.
  • A server installed from the Marketplace arrives switched off and pending confirmation: its first switch-on shows the same warning.
  • Servers you saved and left switched on start by themselves when the app starts, so their tools are already in the chat without opening this sheet; one that is pending confirmation stays off.
  • If a server announces tools that aren't being offered, its row says “This server announced tools that are not being offered:” with up to three reasons.
  • Turn MCP tools off for one provider with MCP tools in Per-provider tuning.

You can't, and why

  • Launch npx, python, deno or any other command: “That command cannot be run here. Only node is supported.” npm isn't bundled with the app, and downloading and running code is not allowed.Google Play
  • Connect remote MCP servers (HTTP or SSE): servers are local programs the app starts and talks to over stdio, and there is no network transport.By design
  • Use a server's resources or prompts: only its tools are exposed.By design
  • Pass shell characters in the arguments: a semicolon, ampersand, pipe, backtick, $(, >> or << is rejected. Pass values as environment variables instead.By design

Limits of a server

LimitValue
Tools per server128. Extra tools are dropped and the row says so.
Whole tool catalogue64 KB; the schema of one tool, 32 KB; and at most 50 pages of tools/list.
Waiting times15 s to start (initialize), 10 s to list tools, 30 s per tool call, extended each time the server reports progress (up to 20 times).
ProtocolMCP over stdio, version 2024-11-05. The tool list reloads when the server says it changed.

Tool permissions

Settings → AI → AI Tool Permissions decides which tools each provider, or one specific model, may call. “All tools are allowed by default.” Nothing here needs a plan or a fingerprint. Denials are enforced for real: every AI turn passes through one gate, on the CLI and language-server path (Copilot, ChatGPT login) and on the direct API path alike, and if your permissions can't be read, the tool is refused rather than allowed.

You can

  • Pick a provider on the chip strip (OpenAI, Gemini, Claude, Copilot, Custom) and a scope: Provider-wide, or one model with Change. The models offered are the app's built-in ones for that provider.
  • Allow Copilot LSP tools (Copilot only): when off, the Copilot language server answers in text only; file edits and terminal commands are blocked.
  • Ask before acting outside this device (on by default): pushing, deploying or calling an external server are parked until you approve; the agent carries on meanwhile and never waits.
  • Let the AI work on its own (off by default): lets the AI run audits, docs and memory after a session, only while charging on Wi-Fi, never ahead of you and capped per day. Off means those calls aren't made.
  • Auto-approve: run whole categories of tools without asking, in the Default permission mode.
  • Fifteen categories (Read-only, Questions, Write, Terminal, Todo, Cortex coordination, Memory, Design, Deploy, Database, API, SSH, Git, Browser, Workflows): each one folds, shows “N / M allowed”, has Allow all and Deny all, and a switch per tool. Agent only, Cortex only and Needs setup mark tools that aren't offered in every mode.

You can't, and why

  • Unlock with a switch a tool you haven't bought: the plan check runs before your permissions.By design
  • Make a deny matter where a tool wasn't offered: switching off a tool in a mode that doesn't offer it changes nothing.By design
  • Scope a denial to a model the app doesn't know: the per-model menu lists the app's built-in models, not the live list from your provider. Provider-wide always applies.By design
Pro-only tools stay unavailable on Free whatever you set here; see Free and Pro.

Secrets

Settings → AI → Secrets holds tokens and API keys the assistant can use in terminal commands and requests without ever seeing them. The assistant asks for one with a card in the chat when it needs it, or you add it here.

You can

  • Add a secret with a Name (capital letters, digits and _, up to 64, starting with a capital: GITHUB_TOKEN), a Value (4 to 16,384 characters, one line) and the Hosts it may be sent to (separated by commas, api.github.com or *.example.com; HTTPS only except localhost; at most 16). With no hosts, the secret is for terminal commands only, which always ask first.
  • Edit a secret: change its hosts, or type a New value (optional); leave it empty to keep the current one.
  • Delete it after a confirmation: “It is removed from this device and the assistant can no longer use it. This cannot be undone. If the token may have leaked, revoke it at its service too.”
  • The assistant injects the value into the command's environment or the request's header and masks it in the output, and only towards the hosts you approved.

You can't, and why

  • See or export a stored value, not even here: “What you type is encrypted on this device. The assistant never sees it, and it is never shown again.”By design
  • Use a reserved name such as PATH, HOME or NODE_OPTIONS, or one starting with LD_, DYLD_, ANDROID_ or BOOTCLASSPATH: “This name is reserved: as a secret it would change how every terminal command runs.”By design
  • Send a secret over plain http://: “only https:// is allowed, except towards localhost.”By design

Where they are stored

  • Encrypted with AES-256-GCM, with a key from the Android Keystore (StrongBox when the phone has it), in a file that belongs to your account. They are not sent to PocketCode's servers.
  • The whole sheet blocks screenshots.

Swarmcode and Cortex settings

Settings → AI → Swarmcode sets up the chat's multi-agent mode, where several agents work on your request in parallel and a panel of judges checks the answer before it's shown. Opening and editing the sheet is free; running Swarmcode needs Pro, with 2 free runs as a trial. How to use it is in AI Chat.

Missions (engine chip menu)

MissionWhat it does
ReviewFinds problems from several angles: correctness, security, edge cases and maintainability. Doesn't touch your files. It is the default.
Bug huntChases one failure: it ranks the suspects by likelihood and cites file and line. Doesn't edit files.
InvestigateAnswers a question about your code by reading the project from different angles. Doesn't edit files.
BuildEach agent drafts its own version of the change and the best verified one is written to your project. The only mission that writes, and not under No tools or Read only access.

Intensity, budget and second opinion

You pick the missions in the chat's engine chip menu, under Mission, not in this sheet. The sheet has three controls. Your changes are a draft until you tap Apply changes, and they count from the next run.

You can

  • Intensity: Quick (2 attempts, 1 judge, up to 1 review round), Balanced (3 attempts, 3 judges, up to 2 rounds; the default) or Thorough (5 attempts, 3 judges, up to 3 rounds). The attempts are a ceiling: the lead uses as many as the task needs.
  • Budget per run: ~200K tokens (est.) by default. One tap gives 100K, 200K or 400K; Custom goes from 0 to 500K in steps of 10K, and 0 is No limit. At 85% the run pauses and asks you before going on. With no limit it never pauses by itself.
  • Second opinion from another provider (off by default): one judge runs on another AI provider you have connected. That provider also receives your request, the answer being judged and any code it quotes. It is never used when the chat runs on a local server.

You can't, and why

  • Run Swarmcode on the Free plan beyond its 2 free runs: you can set it up, but once the free runs are used, choosing the Swarmcode engine in the chat opens the Pro paywall.Pro
  • Turn the judges off, or set the number of agents, judges and review rounds one by one: the Intensity sets them together, and verification is always on.By design
  • Ask for more than 5 attempts: Thorough is the top level.By design

Cortex

SettingWhat it does
Cortex: things at onceOn the AI list: how many agents Cortex may run at the same time, 1 to 4 (default 2). “More at once means more coming back to you at once.”
Cortex itself, its trial and its agents, and how to run Swarmcode, are covered in AI Chat

Free and Pro

Connecting AI is free for everyone. The paid parts are the multi-agent tools built on top of it.

FeatureFreePro
Keys, ChatGPT login, Copilot, custom endpointsYes. No limit on keys or endpoints. ChatGPT login and Copilot need their own paid subscriptions.Yes
Per-provider tuning, model per task, visible modelsYesYes
Tool permissions, MCP servers, secretsYesYes
Swarmcode (running it)A trial of 2 completed runs. The settings sheet opens.Yes
CortexA trial of 3 completed missionsYes
AI OfficeNoYes
A new AI design from the Visual Designer's start screenNoYes
Create and change workflows from the chatNo. You can still write and run workflows yourself.Yes
Your keys are never removed when a subscription ends. What each Pro tool includes is in Plans & Pricing

Privacy and security

What the app keeps, where, and what leaves the phone:

  • Keys are encrypted on the device. AES-256-GCM, with a key held in the Android Keystore (StrongBox when the phone has it). They're stored per account: signing out deletes nothing, and another account on the same phone can't read them.
  • The key sheet protects the screen. Screenshots and the recent-apps preview are blocked, and a saved key is only ever shown as a fingerprint.
  • The fingerprint prompt is a door, not a vault. It guards opening API Keys from Settings. It doesn't cover the chat's shortcuts, and the Keystore key itself doesn't ask per use, so the app can use your keys in the background.
  • Straight to the provider. Requests go from your phone to the provider's API (Claude, OpenAI, Gemini), to your own server (Custom), to GitHub through the Copilot language server, or to OpenAI through the Codex CLI. PocketCode has no AI proxy and no copy of your keys.
  • What goes to PocketCode's server: only the model catalogue (pocketcodeapp.com/models.json; asking for it tells our server the app is open, with your IP address) and, if you report an AI answer, that report. The list of providers and prices for custom endpoints comes from the third-party catalogue models.dev.
  • Recorded usage is stored on the device and counts only what providers returned. Secrets are encrypted per account and never shown or sent to PocketCode.
  • Tool permissions fail closed: if they can't be read, the tool is refused.

Zero-egress (no network AI)

Settings → AI → Zero-egress (no network AI): “When on, the app makes no network AI calls — everything stays on-device. Online models are disabled until you turn this off.” A toast confirms: “Zero-egress on — cloud AI disabled”.

You can

  • It is off by default and is remembered per account.
  • Turn it on to stop every AI request: the chat and the other AI features, checking a key you save, the model catalogue and quota lookups (the app serves the last saved copy), the Copilot language server, pages the agent fetches from the web, and AI-content reports.
  • While it's on, the empty chat shows Nothing leaves this device with See the setting to turn it off.

You can't, and why

  • Keep a local model working: the switch is not selective. It blocks every provider, including a custom endpoint on your own phone such as Ollama, and PocketCode has no model of its own to run on-device.By design
  • Count on it as an operating-system firewall: it only stops the app's own AI calls.By design

The first time you send something to a provider, the chat asks Send to …?: “To answer, PocketCode sends your message and any code or files you attach to … — a third-party AI provider — over the internet. Avoid sharing secrets or personal data you don't want processed by them.” You can Send or Cancel.

You can

  • The answer is remembered per provider and per account.
  • Every AI feature checks it, not only the chat; without it, nothing is sent.

You can't, and why

  • Send anything to a provider you haven't agreed to: “PocketCode has not sent anything: you have not yet allowed your messages and code to be sent to ….” If the preference can't be read, the app asks again.By design

Limitations

What doesn't work, so it doesn't catch you by surprise:

  • Gemini has no sign-in: Google ended Gemini CLI sign-in for individual accounts on 18 June 2026, so only an API key works.Third party
  • Claude has no sign-in: only an API key works.By design
  • ChatGPT login needs a paid ChatGPT plan that includes Codex, and only runs the models Codex accepts for your account.Third party
  • ChatGPT login only works on 64-bit ARM phones. On emulators and Chromebooks use an OpenAI API key.Device
  • GitHub Copilot needs a paid Copilot subscription, and its list of models is the one your plan includes.Third party
  • The Codex CLI and the Copilot language server are updated only with the app: there is no update channel outside Google Play.Google Play
  • Copilot and ChatGPT login send text only: images aren't attached. Claude, Gemini, OpenAI with an API key and custom endpoints can send images to models marked Vision.​By design
  • MCP servers can only run node scripts on the phone, with no remote (HTTP or SSE) transport; and a server's catalogue is capped (128 tools, 64 KB).Google Play
  • Plain http only reaches a few addresses: localhost, 127.0.0.1 and 10.0.2.2. Use HTTPS or a USB tunnel for a server on your network.By design
  • Provider quota exists only where the provider reports it, and the Codex and Copilot sources aren't documented by their owners, so they can stop working without notice.Third party
  • Hiding a model doesn't block it: use tool permissions to restrict what it can do.By design
  • Zero-egress is all or nothing: it also blocks a custom endpoint on your own phone.By design
  • A stored secret or key can't be viewed again; secrets go only to HTTPS hosts (HTTP only to localhost), at most 16 per secret.By design

Troubleshooting

“OpenAI rejected this key. Check it and try again.”

The provider answered no to the check request, and the key was not saved. Copy the key again from the provider's page (spaces and quotes are cleaned, but a revoked or cut-off key isn't), make sure it belongs to that provider (OpenAI sk-, Claude sk-ant-, Gemini AIza), and create a new one if needed.

“Could not check the OpenAI key; it will be used anyway.”

The app couldn't reach the provider (no connection, a timeout, or Zero-egress on), so the key was saved as Not checked yet. When you're online, open the provider's row and tap Check now.

“This is an admin key; chat needs a regular API key.”

Keys starting with sk-ant-admin are for Anthropic's administration API. Create a regular API key at console.anthropic.com/settings/keys.

“This looks like a key for Anthropic (sk-ant-). Keys for OpenAI start with sk-.”

You pasted a key into the wrong provider's row. Open the right row, or fix the key.

“The code expired before it was authorised”

You took too long to approve in the browser. Tap Retry (or Sign in with GitHub again) and approve sooner.

“No browser found. Install one and tap the button again.”

ChatGPT login and Copilot need a browser to approve the sign-in. Install one and try again.

“Your ChatGPT account doesn't include Codex. You need a paid plan (Plus, Pro, Team or Enterprise) to use Codex.”

ChatGPT login only works with a paid plan that includes Codex. Use an OpenAI API key instead, or upgrade the plan.

“Codex won't run … with your ChatGPT account. Pick another model, or use an OpenAI API key or another provider.”

Codex accepts only some models per account. Choose another model in the picker (the unavailable ones say Not available on your plan).

“You've hit the Codex usage limit on your ChatGPT account. Try again later.”

The limit is your ChatGPT plan's. Wait, or switch provider.

“Couldn't connect to OpenAI. If you use private DNS (DoT) on mobile data, turn it off or connect over Wi-Fi and try again.”

The ChatGPT login path can fail on mobile data with private DNS. Turn private DNS off or use Wi-Fi.

“Your Codex session expired. Sign in with ChatGPT again.”

Open Settings → AI → API Keys → OpenAI and sign in again.

“Couldn't reach … Is the server running?”

Test connection couldn't get to your custom endpoint. Start the server, check the address and, for a computer, that adb reverse or Tailscale Serve is running.

“… answered, but there's no model list at this address. Check that it ends in /v1.”

The server answered but not on the OpenAI model path. Make the Base URL end in /v1.

“Connected · N ms · no models loaded. Load one on the server and test again.”

The endpoint works but has no model loaded. Load a model in LM Studio or Ollama, then test again.

“Android blocks unencrypted HTTP to …”

Plain http:// only reaches localhost, 127.0.0.1 and 10.0.2.2. Use HTTPS (Tailscale Serve) or USB with adb reverse and http://127.0.0.1.

“That isn't a valid address. It should start with http:// or https://.”

Fix the Base URL.

Couldn't load models or The key was rejected in the model picker

Tap Retry or Refresh models. If the key was rejected, replace it in API Keys.

Nothing leaves this device in the chat

Zero-egress (no network AI) is on. Tap See the setting and turn it off.

“PocketCode has not sent anything: you have not yet allowed your messages and code to be sent to …”

You haven't accepted the sharing notice for that provider. Open the AI chat and accept it, or pick another provider.

“That command cannot be run here. Only node is supported.”

MCP servers must be started with node and a script on the phone (for example node /sdcard/mcp/server.js).

An MCP server shows Failed

The red line under the row is the last error. Check that the script path exists on the phone and that the command is node, then switch the server off and on again.

“This name is reserved: as a secret it would change how every terminal command runs.”

Choose another name for the secret (not PATH, HOME, NODE_OPTIONS, or anything starting with LD_ or ANDROID_).

The agent says a tool “is denied by the user's tool permissions”

You switched that tool off for the active provider or model. Open AI Tool Permissions, pick the provider (and model scope) and turn it back on.