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 catalog | 1 KiB |
skill_catalog_bytes | Combined skill catalog | 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, or the combined schemas loaded by a search | 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 skill catalog budget is estimated from 2% of the model's context window, using four bytes per token. If the context size is unknown, it defaults to 8,000 characters. Setting skill_catalog_bytes replaces this with a fixed byte limit.
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.
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.
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.