SC26AI agents lab + dinner on the river · Nov 17
Parallel Works

Settings

pw code reads its configuration from a user settings file in your home directory, with optional per-workspace files you can check into a project. Common settings can also be changed from inside a session with the interactive /settings menu.

Settings Files

Settings are read from these files, lowest to highest precedence. A higher file overrides a lower one key by key:

FileScopeWhat it can set
~/.config/agents/settings.jsonUser, shared with other agent toolsHooks only: hooks, disableAllHooks, allowedEnvVars
~/.config/pw/code.jsonUserEvery key
<workspace>/.mcp.jsonProjectmcpServers only
<workspace>/.agents/settings.jsonProject, typically checked inEvery key except the user-only keys below
<repo-root>/.agents/settings.local.jsonLocal, personalEvery key except the user-only keys below
  • ~/.config/pw/code.json holds your own settings and is written with owner-only permissions (0600). Both user paths honor XDG_CONFIG_HOME and are the same on macOS and Linux. The first time pw code runs, code.json is created from the code section of an older ~/.config/pw/settings.json if one exists.
  • .agents/settings.local.json lives at the repository root, so one file covers every subdirectory you start in. In a git worktree it is read from the main checkout. Adding a rule to it with /permissions also adds it to your global git excludes, so it is not committed.
  • ~/.config/agents/settings.json is read for hooks only. Allow rules placed there are ignored with a warning; keep them in code.json.

User-only keys are read from ~/.config/pw/code.json alone. A workspace file that sets them has no effect, so a cloned repository cannot change them: sessionRetentionDays, remoteControl, trustedSkills, disabledSkills, agentsGrouping, agentsKeymap, disableAllHooks, allowedEnvVars, and workspaceSettingsTrust.

A few keys combine instead of overriding:

  • permissions.allow rules from code.json, .agents/settings.json, .agents/settings.local.json, and the --allowedTools flag all apply together.
  • hooks from every layer run; see Hooks.
  • mcpServers is replaced wholesale, not merged: the highest-precedence file that defines it supplies the entire server set. See MCP Servers.
  • disableSkillShellExecution can be turned on by a workspace file, but not turned back off when your user settings turn it on.

Workspace Trust

Workspace configuration only applies after you approve it. The first time pw code starts in a workspace whose configuration it has not seen before, it lists the files and asks whether to apply them. The prompt covers:

  • .mcp.json MCP servers
  • .agents/settings.json and the repository's .agents/settings.local.json
  • Agent definitions in .agents/agents/
  • Custom commands in .agents/commands/ and .pw/code/commands/
  • Skills in .agents/skills/ of the workspace and each parent directory up to the repository root

Your answer is remembered for that exact content: if any of the files change, you are asked again at the next launch. Until you approve, none of the workspace files apply and the session runs on your user settings alone.

Project hooks are not enabled by this prompt. They have their own trust step, /hooks trust.

Non-interactive runs never prompt. Unapproved workspace configuration is ignored with a notice on stderr, so launch pw code interactively once in a workspace you want scripts to use. Approvals are stored in code.json under the workspaceSettingsTrust key, which is managed automatically.

Key Reference

All keys are optional.

Model and Permissions

KeyTypeDefaultDescription
modelstringnoneModel ID to start with (e.g. Jake.Thayne:openai/gpt-5.2). Updated automatically to the model you last used.
allocationstringnoneBudget allocation for org: provider models. Updated to the one you last used.
effortstringnoneReasoning effort sent with requests: none, minimal, low, medium, high, xhigh, or max. Unset uses the provider default. Support varies by model. Updated to the one you last chose.
permissionModestringaccept-editsStartup permission mode: read-only, accept-edits, bypass-permissions, or plan. See Mode Precedence.
permissions.allowstring[][]Allow rules that pre-approve tool calls, e.g. "Bash(git status:*)".
permissions.deny, permissions.askstring[]noneAccepted and kept in the file, but not enforced yet. A file that sets them gets a warning.
allowedToolsstring[]noneOlder spelling of permissions.allow. Still read from your user settings and moved to permissions.allow on the next save. In a workspace file it is ignored with a warning to move the rules to permissions.allow.
remoteControlobjectsee belowWhat the web app may do on this machine. User-only. See Remote Control.

remoteControl fields, all set from /settings:

FieldDefaultDescription
newSessionsfalseStart new sessions with remote control on. A resumed session keeps the setting it had.
startfalseLet the web app start new sessions on this machine.
maxPermissionModeaccept-editsThe highest permission mode a remote client may use. Remote turns are clamped to it.
selfConnecttrueLet the pw code daemon connect to the platform itself while a session is open to remote control. Off leaves the machine reachable only through a pw agent.

Turns and Context

KeyTypeDefaultDescription
maxTurnTokensnumber0Per-turn token budget; the turn stops when it is exceeded. 0 = unlimited. See Usage & Costs.
maxTurnsnumber0Cap on agentic steps in one turn of the main session. 0 = unlimited. When the cap is reached, the agent is asked for a final summary instead of the turn ending with an error.
compactAtnumber0Live context size, in tokens, at which the conversation is automatically compacted. 0 = the model's context window minus 20% of it, with at most 100,000 tokens held back; 102,400 when the window is unknown. A value above the known window's default is lowered to that default. See Usage & Costs.
autoCompactWindownumber0Size automatic compaction as if the context window were this many tokens, for a model whose window is larger than you want to fill. 0 = the model's own window.

Interface

KeyTypeDefaultDescription
includeCoAuthoredBybooleantrueAttribution on commits and pull requests the agent creates. See below.
autoScrollbooleantrueKeep the transcript pinned to the bottom as output streams.
reduceMotionbooleanfalseDisable the working-spinner animation.
mouseClicksbooleanfalseLet mouse clicks act on the interface (select picker rows, toggle blocks, drag-select). Wheel scrolling always works.
agentsGroupingstringprojectHow the agents list groups sessions: project, status, or model. User-only.
agentsKeymapobjectnoneRebinds keys in the agents list: an action name mapped to a list of keys. An empty list unbinds the action. User-only.

agentsKeymap actions: help, open, filter_next, filter_prev, group, search, new, new_worktree, resume, fork, rename, toggle_pin, stop, archive, hide, and delete. open_agents has no default and adds keys that open the agents list from the chat.

Sessions and Subagents

KeyTypeDefaultDescription
sessionRetentionDaysnumber0A positive number deletes sessions untouched for that many days; resuming a session resets its clock. The sweep runs in the pw code daemon when it starts and every 6 hours after. 0 or a negative value keeps sessions forever. User-only. See Sessions & Resume.
disableSubagentsbooleanfalseWithhold the delegation tool entirely, so the agent cannot spawn subagents.
subagentConcurrencynumber0How many subagent tasks may run at once. 0 = default (10).
subagentMaxTurnsnumber0Default cap on agentic steps per delegated task. 0 = default (30); a negative value removes the cap. A custom agent's maxTurns overrides it.
subagentTimeoutMinutesnumber0Default budget for how long a delegated task may go without making progress. 0 = default (15 minutes); a negative value removes the budget. A custom agent's timeoutMinutes overrides it.
subagentDepthnumber0How deep subagents may nest. 0 or 1 = subagents cannot spawn their own subagents.
subagentModelstringnoneDefault model for delegated tasks. Empty = inherit the session's model.

For what the subagent keys control in practice, see Subagents.

Integrations and Skills

KeyTypeDefaultDescription
mcpServersobject{}MCP server definitions.
hooksobject{}Hooks keyed by event name.
disableAllHooksbooleanfalseTurn every hook off. User-only.
allowedEnvVarsstring[][]Environment variables an http hook may use in its headers. User-only.
disableSkillShellExecutionbooleanfalseStop skills and custom commands from running shell placeholders and from adding their allowed-tools grants. A workspace file can turn it on, but not off.
trustedSkills, disabledSkillsarray[]Your skill trust and enable decisions. Managed by /skills; do not edit by hand. User-only.

Example

{
  "model": "Jake.Thayne:openai/gpt-5.2",
  "permissionMode": "accept-edits",
  "permissions": {
    "allow": ["Bash(git status:*)", "Bash(go test:*)"]
  },
  "compactAt": 80000,
  "includeCoAuthoredBy": false,
  "sessionRetentionDays": 90,
  "subagentConcurrency": 4,
  "subagentModel": "Jake.Thayne:openai/gpt-5.2-mini",
  "mcpServers": {
    "docs": {
      "command": "npx",
      "args": ["-y", "docs-mcp-server"]
    }
  }
}

Mode Precedence

A session starts in the mode from the first of these that is set:

  1. The --permission-mode flag.
  2. When resuming, the mode the session last ran in.
  3. The permissionMode setting.
  4. accept-edits.

When you start with --agent and that custom agent sets permissionMode, it can lower the mode but never raise it.

The /settings Menu

Run /settings in an interactive session to change common settings without editing files. Type to filter the rows, move with the arrow keys, and press Enter to change the highlighted row; Esc closes the menu. Changes are saved to ~/.config/pw/code.json immediately.

RowWhat it does
Permission modeCycles read-only → accept-edits → bypass-permissions → plan. See Permissions.
Co-authored-by trailerToggles commit and pull request attribution on or off.
Auto-scrollToggles following the transcript as output streams.
Reduce motionToggles the working-spinner animation.
Mouse clicksToggles click interaction with the interface; scrolling and text selection always work.
SubagentsEnables or disables delegating tasks to subagents.
Subagent concurrencyOpens a number box for the parallel-task limit. Enter applies, Esc cancels; leaving it empty keeps the current value.
Subagent nesting depthOpens a number box; 1 means subagents cannot spawn their own subagents.
Subagent modelOpens a model picker for the default delegated-task model. Shows (inherit session) when unset.
Session retentionOpens a number box for the sweep window in days; 0 keeps sessions forever. See Sessions & Resume.
Auto-compact windowOpens a number box for autoCompactWindow, in tokens. Unset uses the model's own window.
ModelOpens the model picker to change the session's model.
AllocationOpens the allocation picker (org providers). See Models & Allocations.
Remote control for new sessionsToggles remoteControl.newSessions.
Allow remote session startToggles remoteControl.start.
Remote permission ceilingCycles remoteControl.maxPermissionMode.

Commit and PR Attribution

When includeCoAuthoredBy is enabled (the default), the agent ends every commit message it creates with an attribution line and a Co-Authored-By: pw code <noreply@parallelworks.com> trailer, and ends the pull requests it opens with the same attribution line. Turning it off with the Co-authored-by trailer row in /settings applies to the current session's future commits, not just the next launch.

Environment Variables

VariableEffect
XDG_CONFIG_HOME, XDG_STATE_HOME, XDG_CACHE_HOMEMove the config, state, and cache directories. See Where the CLI stores files.
MCP_TIMEOUTDefault connection timeout for MCP servers that do not set their own timeout. A bare number is milliseconds; a value such as 60s also works.
VISUAL, EDITORThe editor that opens a plan for editing. VISUAL wins when both are set.
PW_CODE_MOUSE0 or false turns off mouse tracking entirely, so your terminal's own text selection works.
CLAUDE_CODE_DISABLE_CRON1 turns off scheduling: /loop, the scheduling tools, and the firing of tasks already scheduled in a session.