Configuration

Use /settings to change your preferences in fx. You can also edit ~/.fx/settings.json for personal settings or .fx.json for shared project defaults.

Files and precedence

FilePurpose
~/.fx/settings.jsonPersonal settings and workspace overrides.
<workspace>/.fx.jsonShared project defaults.

MCP servers use separate files: ~/.fx/mcp.json and <workspace>/.mcp.json.

For each setting, the highest available source wins:

  1. command-line flag, where supported
  2. environment variable
  3. matching workspace entry in ~/.fx/settings.json
  4. global entry in ~/.fx/settings.json
  5. <workspace>/.fx.json
  6. built-in default

Settings files have a 64 KiB limit. fx ignores unknown keys and reports invalid settings at startup.

Project configuration

Create .fx.json in the directory where you run fx, or add these fields to the existing file:

{
  "max_agent_steps": 40,
  "max_tool_result_bytes": 131072
}
FieldDescriptionType and valuesDefault
max_agent_stepsMaximum agent steps per turn; 0 means unlimited.Non-negative integer0
max_tool_result_bytesTool output budget in model context; saved results can be larger.Integer of at least 102465536
contextLoad project instructions.Booleantrue
provider_orderPreferred AI Gateway providers, in order.Array of up to 8 provider slugsNo preference
provider_strictRestrict Gateway requests to provider_order.Booleanfalse

Only the fields above apply in .fx.json. Keep personal settings, including models and permissions, in ~/.fx/settings.json. See Model routing for provider_order and provider_strict.

User profile

Add these fields to ~/.fx/settings.json to collapse tool output and turn off generated conversation titles:

{
  "collapse_tool_calls": true,
  "session_titles": false
}

Restart fx after editing a settings file by hand. The profile also accepts the project settings listed above.

Agent and model settings

FieldDescriptionValues and default
providerService used for model requests."gateway", "codex", "grok", or a configured connection name. Default: "gateway".
providersNamed custom model connections.Object stored only at the top level of the private profile.
modelsSaved model ID for each provider or connection.Object keyed by provider, such as {"gateway": "moonshotai/kimi-k3"}.
permission_modeHow fx handles tool calls that need permission."ask", "auto", or "full-access"; legacy "yolo" is also accepted. Default: "auto".
first_call_tool_choiceTool choice for the first request; required vision fallback takes precedence."auto" or "none". Default: "auto".
review_modelAI Gateway reviewer used by Auto mode.An AI Gateway model ID or "typesafeai/jev". See review models.
fast_modeUse faster inference when supported.Boolean. Default: false.
effortReasoning effort for the selected model."auto" or an effort name supported by the model; null resets to auto. Default: "auto".

For context_limits, see Context limits. For permission rules, see Permissions.

Interface and update settings

FieldDescriptionValues and default
slash_menu_categoriesShow command categories and skill sources in search results.Boolean. Default: true.
auto_upgradeDownload and install updates in the background; press ctrl+g to reload.Boolean. Default: true.
update_channelRelease channel used for updates."stable" or "dev". Default: "stable".
startup_scrollbackRestore terminal output at startup.Boolean. Default: true.
collapse_tool_callsShow a summary for each tool-call group.Boolean. Default: false.
session_titlesGenerate a title from the first prompt.Boolean. Default: true.
themeBuilt-in or custom terminal theme."light", "dark", or a file name from ~/.fx/themes/.
prompt_history.enabledSave prompts and slash commands for input history.Boolean. Default: true.
statusLine.contextShow context usage in the footer.Boolean. Default: false.
statusLine.sessionShow the session title in the footer.Boolean. Default: false.
statusLine.workspaceShow the workspace path and Git branch.Boolean. Default: false.
notifications.turn_endPlay a sound when a turn finishes.Boolean. Default: true on macOS, false elsewhere.
notifications.attention_requiredPlay a sound when fx needs your attention.Boolean. Default: true on macOS, false elsewhere.
notifications.maxEnable extra interaction sounds when sound is on.Boolean. Default: false.

Press ctrl+o to see collapsed tool output in Full detail. Automatic titles make a separate model request.

Terminal themes

fx follows the terminal's light or dark mode by default. Set theme to "light", "dark", or the name of a JSON file in ~/.fx/themes/:

{
  "theme": "github-dark"
}

This loads ~/.fx/themes/github-dark.json. fx accepts VS Code color themes and its native theme format. For a native theme, use colors for the interface and syntax for code:

{
  "colors": { "link": "#58A6FF" },
  "syntax": {
    "function": "#D2A8FF",
    "variable": "#FFA657",
    "operator": "#FF7B72"
  }
}

Other syntax slots are keyword, string, number, and comment. Omitted colors keep their defaults. Set "syntax": false to turn syntax highlighting off.

When a named theme ends in -dark or -light, fx uses the matching sibling when the terminal changes appearance, if that file exists.

Workspace entries

To override a setting for one project, add its absolute path under workspaces in ~/.fx/settings.json:

{
  "max_agent_steps": 40,
  "workspaces": {
    "/path/to/project": {
      "max_agent_steps": 80
    }
  }
}

This allows 80 agent steps per turn in that project and 40 elsewhere. Workspace settings override global and project settings.

fx also stores local permission rules and additional directories here. Custom connection definitions (providers) belong at the top level. Model and interface changes made through fx's menus are saved globally.

Environment variables

Environment variables override saved settings for the current process. For example:

$FX_MAX_AGENT_STEPS=20 fx
VariableDescription
AI_GATEWAY_API_KEYAuthenticate with a Vercel AI Gateway API key.
VERCEL_OIDC_TOKENAuthenticate in a Vercel-managed environment.
FX_PROVIDERSelect a built-in provider or custom connection for this process.
FX_MODELOverride the model for this process.
FX_REVIEW_MODELOverride the AI Gateway permission reviewer for this process.
TYPESAFE_API_KEYCall TypeSafe directly when the review model is typesafeai/jev.
FX_PROVIDER_ORDERSet comma-separated AI Gateway provider slugs in preference order.
FX_PROVIDER_STRICTRestrict Gateway routing to the configured provider order when set to 1, true, on, or yes.
FX_PERMISSION_MODEOverride with ask, auto, or full-access; legacy yolo is also accepted.
FX_MAX_AGENT_STEPSOverride the agent step limit.
FX_THEMESelect light, dark, or a custom theme for this process.
FX_SOUNDOverride sounds with on, off, or max.
FX_AUTO_UPGRADE=0Disable automatic upgrade checks for the process.
FX_NO_OPEN_BROWSER=1Print authentication URLs instead of opening a browser.

Diagnostics

Use these controls when investigating a problem:

VariableDescription
FX_DEBUG_RECORD=1Write an automatic private terminal recording under ~/.fx/recordings/.
FX_DEBUG_RECORD_SILENT_BANNER=1Hide the recording notice from the inline transcript while keeping it in Ctrl-O.
FX_RECORDWrite a terminal recording to an explicit path.
FX_RECORD_INPUT=1Include raw terminal input events in a recording.
FX_TRACE=1Write a trace to the default private trace path.
FX_TRACE_LOGWrite a trace to an explicit path; relative paths resolve from the primary workspace.
FX_TRACE_SCOPESLimit traces to an exact comma-separated list of scopes.
FX_TRACE_STDERR=1Write trace lines to stderr, alone or alongside a trace file.
FX_SYNC_UPDATESSet on or off to troubleshoot terminal synchronized updates.
FX_DISABLE_KEYCHAIN=1Disable the native macOS API-key store; fx setup cannot save a key while set.
FX_HERDR=0Disable automatic Herdr lifecycle reporting.

Environment and command-line overrides affect only the current process and are not written back to settings.

Herdr integration

When launched inside Herdr, fx reports whether it is idle, working, or waiting for input. Herdr supplies the local socket and pane ID through HERDR_SOCKET_PATH and HERDR_PANE_ID. Reports include session state, but no prompts or tool output. Set FX_HERDR=0 to disable reporting.

Check which settings fx is using

Show the settings in effect for this run:

$fx status
$fx status --json

Use fx permissions --json for the resolved permission rules and fx workspace --json for active additional directories.

Compatibility

fx still reads the older model, codex_model, and grok_model keys. Saving a model moves it under models.

Use "permission_mode": "full-access" for full access. fx still writes this mode as "yolo" in saved settings and JSON output. fx manages yolo_acknowledged and credential_source when you change permissions or sign in.

Local state

See Data and privacy for saved conversations, credentials, and other local state.