Context limits
Context limits control how much text fx loads from instructions, skills, MCP tools, and image analysis. If content is shortened or omitted, press ctrl+o to see the limit notice in Full detail.
Available limits
| Field | Description | Default |
|---|---|---|
skill_description_bytes | Each skill's description in the toolbox menu and in toolbox search results | One sentence of up to 100 bytes in the menu, 1 KiB in search results |
skill_catalog_bytes | The toolbox menu: skills, MCP servers, and built-in tools in toolbox | Based on the model's context window |
skill_chunk_bytes | Skill content returned by one read | Whole file |
skill_file_bytes | Each skill file or reference file | 1 MiB |
mcp_description_bytes | Each MCP tool description in search results | 1 KiB |
mcp_search_result_bytes | Combined MCP tool search results | 16 KiB |
mcp_server_instructions_bytes | Instructions from each MCP server | 2 KiB |
mcp_selected_schema_bytes | One tool's schema, as toolbox opens it, or the combined schemas of always-loaded ACP client servers | 64 KiB |
project_instruction_file_bytes | Each instruction file | 64 KiB |
project_instructions_total_bytes | Combined project instructions | 128 KiB |
image_adapter_output_bytes | Text returned by the vision tool | 20 KiB |
The toolbox menu budget is estimated from 2% of the model's context window, using four bytes per token, up to 32 KiB. If the context size is unknown, it defaults to 8,000 characters. Setting skill_catalog_bytes replaces this with a fixed byte limit, still at most 32 KiB. When the menu doesn't fit, fx shortens its descriptions, then lists fewer entries; toolbox search still finds the rest.
In the menu, each skill shows the first sentence of its description, up to 100 bytes. A longer sentence ends after its last whole word, or at the limit when it has no space near the end, followed by …. toolbox search results show up to 1 KiB of the description. Setting skill_description_bytes replaces the 1 KiB limit, and a value under 100 bytes also shortens the menu's lines. A skill installed in more than one skills folder with the same name and description appears once in the menu and in search results.
Skills load as complete files. If a file exceeds skill_file_bytes or an explicit skill_chunk_bytes limit, fx rejects the load instead of returning partial instructions.
Instruction files work differently: fx cuts a file longer than project_instruction_file_bytes at its last complete line within the limit, and leaves out whole files once the combined instructions pass project_instructions_total_bytes. See Missing instructions for which files fx keeps.
Settings
Add context_limits to ~/.fx/settings.json. This example doubles the per-file and combined instruction limits:
{
"context_limits": {
"project_instruction_file_bytes": 131072,
"project_instructions_total_bytes": 262144
}
}
Use a non-negative integer in bytes, or "off" to disable a limit. All values, including "off", are capped at 64 MiB. An unknown limit name or any other value makes fx skip the rest of that settings file or workspace entry, keeping only its provider and model choices, and report the problem at startup.
You can also set limits in a workspace entry. Restart fx after editing the file. Project .fx.json does not accept context_limits.
Command-line overrides
Place --context-limit before the command to override a limit for one run:
fx --context-limit project_instruction_file_bytes=131072Repeat the flag to change more than one limit:
fx --context-limit project_instruction_file_bytes=off --context-limit project_instructions_total_bytes=offCommand-line values override workspace and global settings.