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
| File | Purpose |
|---|---|
~/.fx/settings.json | Personal settings and workspace overrides. |
<workspace>/.fx.json | Shared project defaults. |
MCP servers use separate files: ~/.fx/mcp.json and <workspace>/.mcp.json.
For each setting, the highest available source wins:
- command-line flag, where supported
- environment variable
- matching workspace entry in
~/.fx/settings.json - global entry in
~/.fx/settings.json <workspace>/.fx.json- 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
}
| Field | Description | Type and values | Default |
|---|---|---|---|
max_agent_steps | Maximum agent steps per turn; 0 means unlimited. | Non-negative integer | 0 |
max_tool_result_bytes | Tool output budget in model context; saved results can be larger. | Integer of at least 1024 | 65536 |
context | Load project instructions. | Boolean | true |
provider_order | Preferred AI Gateway providers, in order. | Array of up to 8 provider slugs | No preference |
provider_strict | Restrict Gateway requests to provider_order. | Boolean | false |
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
| Field | Description | Values and default |
|---|---|---|
provider | Service used for model requests. | "gateway", "codex", "grok", or a configured connection name. Default: "gateway". |
providers | Named custom model connections. | Object stored only at the top level of the private profile. |
models | Saved model ID for each provider or connection. | Object keyed by provider, such as {"gateway": "moonshotai/kimi-k3"}. |
permission_mode | How fx handles tool calls that need permission. | "ask", "auto", or "full-access"; legacy "yolo" is also accepted. Default: "auto". |
first_call_tool_choice | Tool choice for the first request; required vision fallback takes precedence. | "auto" or "none". Default: "auto". |
review_model | AI Gateway reviewer used by Auto mode. | An AI Gateway model ID or "typesafeai/jev". See review models. |
fast_mode | Use faster inference when supported. | Boolean. Default: false. |
effort | Reasoning 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
| Field | Description | Values and default |
|---|---|---|
slash_menu_categories | Show command categories and skill sources in search results. | Boolean. Default: true. |
auto_upgrade | Download and install updates in the background; press ctrl+g to reload. | Boolean. Default: true. |
update_channel | Release channel used for updates. | "stable" or "dev". Default: "stable". |
startup_scrollback | Restore terminal output at startup. | Boolean. Default: true. |
collapse_tool_calls | Show a summary for each tool-call group. | Boolean. Default: false. |
session_titles | Generate a title from the first prompt. | Boolean. Default: true. |
theme | Built-in or custom terminal theme. | "light", "dark", or a file name from ~/.fx/themes/. |
prompt_history.enabled | Save prompts and slash commands for input history. | Boolean. Default: true. |
statusLine.context | Show context usage in the footer. | Boolean. Default: false. |
statusLine.session | Show the session title in the footer. | Boolean. Default: false. |
statusLine.workspace | Show the workspace path and Git branch. | Boolean. Default: false. |
notifications.turn_end | Play a sound when a turn finishes. | Boolean. Default: true on macOS, false elsewhere. |
notifications.attention_required | Play a sound when fx needs your attention. | Boolean. Default: true on macOS, false elsewhere. |
notifications.max | Enable 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| Variable | Description |
|---|---|
AI_GATEWAY_API_KEY | Authenticate with a Vercel AI Gateway API key. |
VERCEL_OIDC_TOKEN | Authenticate in a Vercel-managed environment. |
FX_PROVIDER | Select a built-in provider or custom connection for this process. |
FX_MODEL | Override the model for this process. |
FX_REVIEW_MODEL | Override the AI Gateway permission reviewer for this process. |
TYPESAFE_API_KEY | Call TypeSafe directly when the review model is typesafeai/jev. |
FX_PROVIDER_ORDER | Set comma-separated AI Gateway provider slugs in preference order. |
FX_PROVIDER_STRICT | Restrict Gateway routing to the configured provider order when set to 1, true, on, or yes. |
FX_PERMISSION_MODE | Override with ask, auto, or full-access; legacy yolo is also accepted. |
FX_MAX_AGENT_STEPS | Override the agent step limit. |
FX_THEME | Select light, dark, or a custom theme for this process. |
FX_SOUND | Override sounds with on, off, or max. |
FX_AUTO_UPGRADE=0 | Disable automatic upgrade checks for the process. |
FX_NO_OPEN_BROWSER=1 | Print authentication URLs instead of opening a browser. |
Diagnostics
Use these controls when investigating a problem:
| Variable | Description |
|---|---|
FX_DEBUG_RECORD=1 | Write an automatic private terminal recording under ~/.fx/recordings/. |
FX_DEBUG_RECORD_SILENT_BANNER=1 | Hide the recording notice from the inline transcript while keeping it in Ctrl-O. |
FX_RECORD | Write a terminal recording to an explicit path. |
FX_RECORD_INPUT=1 | Include raw terminal input events in a recording. |
FX_TRACE=1 | Write a trace to the default private trace path. |
FX_TRACE_LOG | Write a trace to an explicit path; relative paths resolve from the primary workspace. |
FX_TRACE_SCOPES | Limit traces to an exact comma-separated list of scopes. |
FX_TRACE_STDERR=1 | Write trace lines to stderr, alone or alongside a trace file. |
FX_SYNC_UPDATES | Set on or off to troubleshoot terminal synchronized updates. |
FX_DISABLE_KEYCHAIN=1 | Disable the native macOS API-key store; fx setup cannot save a key while set. |
FX_HERDR=0 | Disable 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 statusfx status --jsonUse 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.