Tune

May 22, 2026 · View on GitHub

The /tune command opens a modal UI for adjusting runtime model behaviour. It lets you change tool profiles, compaction strategy, native tool calling, and model parameters — all without restarting your session.

Settings are persisted to nanocoder-preferences.json and restored on next launch.

Opening Tune

Type /tune in the chat input. Use arrow keys to navigate, Enter to select, and Esc to cancel.

Settings

Enabled / Disabled

The top menu item toggles tune on or off. When disabled, all settings revert to defaults. When enabled, the full settings menu appears.

Tool Profile

Controls which tools the AI has access to.

ProfileToolsBehaviour
full (default)All registered tools including MCP serversNo filtering applied
minimal8 core tools: read_file, write_file, string_replace, execute_bash, find_files, search_file_contents, list_directory, agentSlim prompt and single-tool enforcement enabled automatically
nano5 core tools: read_file, string_replace, write_file, execute_bash, search_file_contentsUltra-slim prompt, single-tool enforcement, AGENTS.md omitted by default

The minimal profile is designed for small models (1B-8B parameters) that struggle with large tool sets. It reduces the system prompt size and forces the model to call one tool at a time.

The nano profile is designed for the smallest models or low-end hardware running larger models locally. It is strictly more aggressive than minimal:

  • Drops find_files, list_directory, and agent (subagent delegation).
  • Drops the CORE PRINCIPLES and CODING PRACTICES prompt sections.
  • Uses shortened TASK APPROACH, FILE OPERATIONS, CONSTRAINTS sections (≤4 lines each).
  • Replaces the verbose SYSTEM INFORMATION block with a single-line ## SYSTEM line.
  • Omits AGENTS.md from the system prompt by default (override with the Include AGENTS.md toggle).

Together these reduce the system prompt from ~500–700 tokens (minimal) to roughly ~150–250 tokens (nano), leaving more of the context window for actual work.

Include AGENTS.md

Toggles whether AGENTS.md from the project root is appended to the system prompt.

  • Defaults ON for full and minimal profiles (preserves prior behaviour).
  • Defaults OFF for the nano profile.
  • Can be flipped explicitly per session, persisted via preferences, or pinned in agents.config.json via tune.includeAgentsMd.

Disabling this is useful on tiny models that get crowded out by long project guidelines.

Aggressive Compact

When enabled, sets the auto-compact threshold to 40% and mode to aggressive. This compresses conversation history more frequently and aggressively — useful for models with small context windows.

Native Tool Calling

Toggle native tool calling on or off. When disabled, tools are described in the system prompt and the model uses XML fallback for tool calls instead of the provider's native tool calling API. This can help with models that have unreliable native tool support.

Model Parameters

Fine-tune the model's generation parameters:

ParameterRangeDescription
Temperature0.1 - 2.0Controls randomness. Lower = more focused, higher = more creative
Top P0 - 1.0Nucleus sampling. Lower = fewer token choices considered
Top K1 - 200Limits token choices to top K candidates
Max Tokens64 - 32768Maximum response length
Frequency Penalty-2.0 - 2.0Penalises repeated tokens. Higher = less repetition
Presence Penalty-2.0 - 2.0Penalises tokens already used. Higher = more topic diversity

Press Enter on a parameter to cycle through values. Select Reset All to Defaults to clear all parameter overrides.

Provider-specific parameters

Some providers accept additional reasoning controls that are configured through agents.config.json rather than the /tune modal:

  • reasoningEffort / reasoningSummary — reasoning controls for OpenAI Responses API models (GPT-5, o-series) via the chatgpt-codex provider. reasoningEffort is also forwarded to OpenRouter as reasoning.effort.

OpenRouter exposes additional always-on request body fields (provider routing, plugins, service tier, fallback models, etc) on the provider config itself — see OpenRouter request options. Those settings are not tied to tune and apply on every request.

Presets

Three built-in presets are available via Load Preset:

PresetSettings
DefaultResets everything to defaults (tune disabled)
Small ModelMinimal tool profile, aggressive compact, temperature 0.7
Nano (low-end hardware)Nano profile, aggressive compact, AGENTS.md off, temperature 0.4, max tokens 2048

Selecting a preset populates the tune form — you can further adjust settings before applying.

Configuration Layers

Tune settings resolve from a 5-layer hierarchy (highest priority wins):

  1. Hardcoded defaultsenabled: false, toolProfile: 'full', aggressiveCompact: false
  2. Top-level configtune in agents.config.json
  3. Per-provider configtune within a provider's configuration
  4. Preferences — saved via the /tune UI to nanocoder-preferences.json
  5. Session override — runtime changes in the current session

Example: Per-Provider Config

Set defaults for a specific provider in agents.config.json:

{
  "providers": {
    "ollama": {
      "name": "Ollama",
      "type": "ollama",
      "models": ["qwen2.5-coder:7b"],
      "tune": {
        "enabled": true,
        "toolProfile": "minimal",
        "aggressiveCompact": true
      },
      "config": {
        "baseURL": "http://localhost:11434/v1"
      }
    }
  }
}

This automatically activates tune with the minimal profile whenever you switch to the Ollama provider.

Interaction with Development Modes

Tune works alongside development modes:

  • Plan mode + minimal profile — the model gets 4 exploration tools (read_file, find_files, search_file_contents, list_directory), making it practical for small models to plan
  • Plan mode + nano profile — the model gets read_file and search_file_contents for exploration, with the shortened plan-mode prompt
  • Plan mode + full profile — all plan-mode tools are available, including read-only git, diagnostics, web, and interaction tools
  • Mode exclusions are filtered on top of the tune profile

Status Bar

When tune is active, the status bar shows a summary of your settings:

tune: minimal | compact | temp:0.7

On narrow terminals, this is shortened to just the profile name.