Configuration File

Posit Assistant is configured through a JSON settings file. This file controls model selection, behavior preferences, runtime configuration, permissions, and more.

File Locations

📝 Directory change

In previous versions, the configuration directory was ~/.positai (global) and .positai/ (project-level). These have been renamed to ~/.posit/assistant and .posit/assistant/. Existing files are migrated automatically on first launch.

Posit Assistant uses two levels of configuration:

  • Global config applies to all projects. Located at:

    • macOS / Linux: ~/.posit/assistant/settings.json
    • Windows: %USERPROFILE%\.posit\assistant\settings.json
  • Project config overrides global settings for a specific project. Place a .posit/assistant/settings.json file in your project root.

Some settings (like providers, storage, and logging) are global-only. Others (like model, permissions, and MCP servers) can be set at either level, with project values taking precedence. The sections below indicate which level each setting supports.

Settings are resolved in this order (last wins): defaults → global config → project config → environment variables.

Per-Project Settings

The following settings can be set in either the global ~/.posit/assistant/settings.json or a project-level .posit/assistant/settings.json. Project values take precedence over global values.

Model Settings

KeyTypeDefaultDescription
model.idstring"claude-sonnet-4-6"The model to use for conversations.
model.providerstring"positai"The LLM provider. The default is "positai" (Posit AI — a managed service from Posit). See the Posit AI page for details.
model.thinkingEffortstringDefault thinking effort level for new conversations. During a conversation, thinking effort is adjusted via the UI and stored per-conversation.
model.webSearchbooleanfalseDefault web search preference for new conversations. During a conversation, web search is toggled via the UI and stored per-conversation.

Permissions

Control which tools the assistant can use. Each key is a tool name (bash, read, edit, etc.) mapped to either an action string or an object of glob patterns:

{
	"permission": {
		"bash": {
			"git *": "allow",
			"rm *": "deny"
		},
		"read": "allow",
		"edit": "ask"
	}
}

You can also set a single action for all tools as a shorthand:

{
	"permission": "ask"
}
KeyTypeDefaultDescription
permissionstring | objectTool permission configuration. Set to "allow", "ask", or "deny" for all tools, or an object with per-tool rules. Pattern matching uses glob syntax for shell commands.
📝 Project vs. global permissions

When you grant or deny permissions through the UI, they are saved to your project-level .posit/assistant/settings.json. If you want permissions to apply across all projects, copy the permission block to your global ~/.posit/assistant/settings.json instead.

MCP Servers

Connect external tool servers using the Model Context Protocol.

{
  "mcpServers": {
    "my-server": {
      "type": "local",
      "command": ["node", "server.js"],
      "environment": {
        "API_KEY": "..."
      }
    },
    "remote-server": {
      "type": "remote",
      "url": "https://mcp.example.com",
      "headers": {
        "Authorization": "Bearer ..."
      }
    }
  }
}
KeyTypeDefaultDescription
typestring"local"Server type. "local" for stdio subprocess, "remote" for HTTP/SSE.
commandstring[]Command and arguments to start a local MCP server.
urlstringURL of a remote MCP server.
enabledbooleantrueWhether this server is active.
timeoutnumber10000Connection timeout in milliseconds.
📝 Project vs. global MCP servers

MCP servers can be configured in either the project-level .posit/assistant/settings.json or the global ~/.posit/assistant/settings.json. Project-level servers are merged with global servers by server name, with project values taking precedence. Use project-level config for project-specific servers and global config for servers you want available everywhere.

Skills

Control where Posit Assistant discovers custom skills.

KeyTypeDefaultDescription
skills.pathsstring[]["~/.agents/skills", "~/.posit/assistant/skills", ".agents/skills", ".posit/assistant/skills"]Directories to search for skills, processed in order. Paths starting with ~ or $HOME are expanded to the home directory. Relative paths are resolved against each workspace root.
📝 Skill name conflicts

When the same skill name exists in more than one directory, the version from the later directory is used.

📝 Project vs. global skill paths

When both global and project-level configs define skills.paths, the project value completely replaces the global value — paths are not merged. To extend the defaults, repeat them in your project config alongside any additions.

Runtime Settings

Control how Posit Assistant connects to R and Python.

KeyTypeDefaultDescription
runtime.r.enabledbooleantrueEnable R runtime integration.
runtime.r.pathstring"Rscript"Path to the Rscript executable.
runtime.r.timeoutnumber30000Timeout in milliseconds for R code execution.
runtime.python.enabledbooleantrueEnable Python runtime integration.
runtime.python.pathstring"python3"Path to the Python executable.
runtime.python.timeoutnumber30000Timeout in milliseconds for Python code execution.

Workspace Settings

KeyTypeDefaultDescription
workspace.pathstring""Working directory. Defaults to the current directory.
workspace.allowedRootsstring[]Allowed root directories for workspace switching. Defaults to the user home directory.

Sandbox

Control sandbox mode for shell tool execution. On macOS and Linux, bash commands run inside an OS-level sandbox (macOS Seatbelt / Linux bubblewrap) that restricts writes to the workspace and temp directories, blocks network access, and prevents reading sensitive paths like ~/.ssh and ~/.aws. On Windows, the same setting enables gated mode for the active shell: commands are checked against a built-in allowlist before they run. This is not an OS-level sandbox.

KeyTypeDefaultDescription
sandbox.enabledbooleanfalseEnable sandboxing for shell tool execution.

You can also toggle sandbox mode during a session with the /sandbox command.

Tips

Control the helpful tips that appear above the input area. A tip always appears on startup; after each assistant turn, a tip appears with a small probability.

KeyTypeDefaultDescription
features.showTipsbooleantrueShow tips above the input after assistant turns and on startup.
💡 Positron users

In Positron, this setting is also available as assistant.showTips in the Settings UI. See Positron Settings for how values from both sources are merged.

Compaction

Control how Posit Assistant manages long conversations. See Context Management for details on how compaction works.

These settings go in the features block of your config file:

{
  "features": {
    "autoCompactTokenBuffer": 30000,
    "microCompactTokenThreshold": 150000,
    "microCompactKeepRecentCount": 8
  }
}
KeyTypeDefaultDescription
features.autoCompactTokenBuffernumber30000Tokens reserved for the compaction summary. Auto-compaction triggers once fewer than this many tokens remain in the context window.
features.microCompactTokenThresholdnumber150000Token count above which micro-compaction activates, silently trimming old tool results.
features.microCompactKeepRecentCountnumber8Number of recent user turns preserved without micro-compaction.
💡 Positron users

In Positron, compaction settings are read from the config file’s features block. They can also be set via Positron’s settings.json as assistant.autoCompactTokenBuffer, assistant.microCompactTokenThreshold, and assistant.microCompactKeepRecentCount, though they are not exposed in the Settings UI. See Positron Settings for how values from both sources are merged.

Cache Keepalive

Keep the prompt cache warm while you read a response and step away. Anthropic’s prompt cache expires after about 5 minutes of inactivity; once it lapses, your next message has to re-cache the whole conversation, which is slower and more expensive. When enabled, Posit Assistant sends a few lightweight background “pings” after each turn that refresh the cache’s lifetime, so a follow-up message lands as a cheap cache hit instead.

This is off by default. To enable it, add the features block to your settings file:

{
  "features": {
    "cacheKeepalive": true,
    "cacheKeepalivePingCount": 3
  }
}
KeyTypeDefaultDescription
features.cacheKeepalivebooleanfalseEnable cache-keepalive pings after a turn completes. Pings only run when this is true and cacheKeepalivePingCount is greater than 0.
features.cacheKeepalivePingCountnumber3How many pings to send after an idle turn (maximum 10). With the default of 3, cache warmth extends from about 5 minutes to roughly 17 minutes of idle time.
📝 Claude models only, and requires restart

Keepalive pings only run on Claude models, which are the only models with a documented 5-minute cache lifetime. Each ping is billed as a low-cost cache read of the conversation prefix. Changes to these settings take effect after restarting the assistant.

💡 Positron users

In Positron, these settings are also available as assistant.cacheKeepalive and assistant.cacheKeepalivePingCount in Positron’s Settings UI. When set in both places, Positron merges them — see Positron Settings for priority order.

Global Settings

The following settings can only be set in the global ~/.posit/assistant/settings.json. They are not supported in project-level config files.

Provider Settings

Provider credentials and connection details are configured under the providers key. Credentials are normally set through the application’s settings UI, but you can override the base URL or attach custom HTTP headers in the config file. This is useful for enterprise proxies or custom API gateways that require extra tenancy or routing markers (e.g. Databricks’ x-databricks-use-coding-agent-mode).

{
  "providers": {
    "positai": {
      "baseUrl": "https://my-proxy.example.com",
      "customHeaders": {
        "x-gateway-tenant": "team-42"
      }
    }
  }
}
KeyTypeDefaultDescription
providers.{provider}.baseUrlstringCustom base URL for the provider's API.
providers.{provider}.customHeadersobjectExtra HTTP headers attached to every request for this provider. Useful for enterprise gateways that require extra tenancy or routing markers. Do not put SDK-managed header names (Authorization, x-api-key, anthropic-version) here — on chat requests they would clobber the SDK's auth headers and break the connection.
providers.allowedProvidersstring[]Restrict which providers are available. If omitted, the platform default is used.
💡 Positron users

In Positron, base URLs and custom headers are stored in Positron’s authentication.* settings. See Positron Settings for details.

Google Vertex AI

For Google Vertex AI on non-Positron platforms, configure your Google Cloud project and Vertex AI location, then authenticate with Application Default Credentials:

{
  "providers": {
    "google-vertex": {
      "googleCloud": {
        "project": "my-gcp-project",
        "location": "us-central1"
      }
    }
  }
}

In Positron, configure Google Vertex AI through the provider configuration dialog instead of editing ~/.posit/assistant/settings.json directly.

Storage Settings

KeyTypeDefaultDescription
storage.pathstring"~/.posit/assistant"Directory for conversation storage.

Logging

KeyTypeDefaultDescription
logging.levelstring"info"Log level. Options: "error", "warn", "info", "debug", "trace".
logging.filestring""Log file path. Defaults to ~/.posit/assistant/logs/{platform}.log.
logging.consolebooleantrueOutput logs to the console.

Example Configuration

{
  "model": {
    "provider": "positai",
    "id": "claude-sonnet-4-6"
  },
  "permission": {
    "read": "allow",
    "bash": {
      "git *": "allow"
    }
  },
  "skills": {
    "paths": [
      "~/.agents/skills",
      "~/.posit/assistant/skills",
      ".agents/skills",
      ".posit/assistant/skills",
      "~/my-company/shared-skills"
    ]
  }
}
📝 Changes take effect on restart

Some configuration changes require restarting the assistant or opening a new conversation to take effect.

Environment Variables

Some settings can also be controlled via environment variables. Environment variables take precedence over file-based configuration.

VariableDescription

| GOOGLE_CLOUD_PROJECT | Google Cloud project for the Vertex AI provider | | GOOGLE_CLOUD_LOCATION | Google Cloud location for the Vertex AI provider | | POSITAI_BASE_URL | Custom base URL for the Posit AI provider |

⚠️ API keys

Never commit API keys to version control. Use environment variables or a secrets manager for sensitive credentials.