Skip to main content
Kliff

Settings and hooks

The Claude Code settings files agents read from repositories and from you, which keys apply, and how hooks run.

Agents read settings in Claude Code's format: a repository's .claude/settings.json, and your own settings in Settings > Agent settings. From these, Kliff applies deny and ask rules, hooks, and a few other keys. Entries Kliff has no equivalent for are listed in the thread as not applied, so you can see what was skipped.

Repository settings files

For each repository, an agent reads .claude/settings.json, then .claude/settings.local.json, and the later file wins. Each file can be up to 256 KB.

KeyWhat Kliff does with it
permissionsApplies deny and ask entries. allow entries are never read. See Permissions and approvals.
hooksRuns them, once a person approves. See Hooks.
disableAllHooksTurns hooks off.
modelUsed when you did not pick a model yourself. See Models.
outputStyleSets the thread's output style. See Skills.
attribution.commit, attribution.prAdds this text to the agent's commits and pull requests, up to 500 characters each.
enableAllProjectMcpServers, enabledMcpjsonServers, disabledMcpjsonServersChoose which servers in the repository's .mcp.json start. See Plugins.
enabledPlugins, extraKnownMarketplacesChoose the repository's plugins. See Plugins.

When an agent works on several repositories, model, outputStyle, and attribution come from the first one. includeCoAuthoredBy is not applied, since Kliff adds no co-author line; use attribution.commit to add one.

Your agent settings

Settings > Agent settings holds your own settings, as your ~/.claude/settings.json would. Their deny and ask rules and their hooks apply to every turn you send, in any organization. The panel says how many rules and hooks Kliff applies, and lists the entries it cannot.

Paste up to 64 KB of JSON. Your own hooks run without asking, since you wrote them.

Hooks

A hook is a command, or a prompt to the model, that runs at a point in a turn. Kliff runs hooks for these events:

SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, PreCompact, Stop, SubagentStop, SessionEnd, and Notification.

  • A command hook runs a shell command on the agent's computer. It has 60 seconds by default and up to 600.
  • A prompt hook asks the model to decide, on UserPromptSubmit, PreToolUse, PostToolUse, Stop, and SubagentStop. It has 30 seconds by default.
  • Up to 20 hooks apply to a turn. A hook can stop the turn, and Kliff reads the JSON a hook prints.

Hooks come from a repository's settings files, from plugins, and from your agent settings. Before hooks from a repository or a plugin first run, the thread shows a Repository hooks card listing them. Approving runs these commands on the agent's computer in this turn and later ones, until one of them changes, and then the card asks again.

Hooks do not run in Plan mode, or when disableAllHooks is set.