Context limits

Context limits bound external instructions and metadata before fx adds them to a model request. Values are byte counts, not token counts.

Available limits

NameDefaultBounds
skill_description_bytes1 KiBOne discovered skill description
skill_catalog_bytes16 KiBCombined skill catalog
skill_chunk_bytes20 KiBOne chunk loaded from a skill
skill_file_bytes1 MiBOne skill file
mcp_description_bytes1 KiBOne MCP tool description
mcp_search_result_bytes16 KiBMCP tool search results
mcp_server_instructions_bytes2 KiBInstructions from one MCP server
mcp_selected_schema_bytes64 KiBSchema for a selected MCP tool
project_instruction_file_bytes64 KiBOne project instruction file
project_instructions_total_bytes128 KiBAll applicable project instructions
image_adapter_output_bytes20 KiBText produced by an image adapter

Settings

context_limits is supported in global and per-workspace entries in ~/.fx/settings.json. It is not accepted in project .fx.json.

{
  "context_limits": {
    "skill_catalog_bytes": 32768,
    "mcp_selected_schema_bytes": "off"
  },
  "workspaces": {
    "/absolute/path/to/project": {
      "context_limits": {
        "project_instructions_total_bytes": 262144
      }
    }
  }
}

A value is a non-negative integer or the string "off". "off" disables the normal limit, but fx still applies a 64 MiB emergency ceiling.

Command-line overrides

Use a leading, repeatable --context-limit flag:

$fx --context-limit skill_catalog_bytes=32768
$fx --context-limit mcp_description_bytes=off acp

Command-line values override workspace and global settings for the current process.

Larger limits increase request size

Raising or disabling a limit can increase latency and model input usage. Prefer the smallest value that preserves the instructions or schema you need.