When a task says "Repo config not trusted"
Why a device refuses a repo that commits hooks, plugins or helper commands, and how to trust one repo, one plugin marketplace or the whole device.
A repository can commit files that make a coding agent run a command. Examples are hooks, helper programs and plugins. A device does not trust those files by default. This page explains the refusal, and how you fix it.
Repo hooks stay refused on purpose. To run an enforced, admin-reviewed hook, use a guardrail.
What triggers the refusal
Before a session starts, the device scans the repository’s working folder, up to the repo root. It refuses the session when it finds config that runs commands or loads code.
For Claude Code, these files count:
.claude/settings.jsonand.claude/settings.local.json, when they sethooks,statusLine,apiKeyHelper,env,enabledPlugins,extraKnownMarketplacesordisableAllHooks. Other helper-command keys count too, such as the AWS and GCP sign-in helpers.disableAllHookscounts unless it isfalse.- Agent files in
.claude/agents/, when the frontmatter setshooksormcpServers. - A skill in
.claude/skills/, when itsSKILL.mdfrontmatter setshooksormcpServers. A skill that CodeHerder delivers for the session does not count.
Other keys, such as permissions and model, do not trigger it. The instructions files CLAUDE.md and AGENTS.md do not trigger it either.
The same rule covers some files for two other harnesses:
- Cursor:
.cursor/hooks.jsonand.cursor/mcp.json. - OpenCode:
opencode.jsonor.opencode/opencode.json(also the.jsoncforms) that setplugin,mcp,formatterorlsp, and non-empty plugin or tool folders under.opencode/(plugin/,plugins/,tool/ortools/).
A committed .mcp.json does not refuse the session. By default, Claude starts in a mode that ignores it, so its servers never run. A marketplace approval alone keeps it off. Trust the repo or the whole device to load its servers.
What you see
CodeHerder tries another device that can run the task. It then skips the refusing device for that task for 24 hours.
When every capable device refuses, the task shows a Start refused badge with the reason Repo config not trusted. ch task show <taskId> shows the same reason in its start refusal row. The refused session records which files and keys the device found. The message is short, so a long list can end with “shortened”.
Fix it, narrowest first
- Remove the config from the repo. This is the safest fix. A repo without these files starts normally.
- Approve a plugin marketplace. When the repo enables plugins from a marketplace your workspace has not approved, the task waits on a blocker. A workspace owner or admin approves the exact source under Integrations, Claude, Marketplaces, or with the buttons on the task’s blocker. Every waiting task then restarts on any device. No device restart or setting is needed. The approval covers one source in one workspace and only the
enabledPluginsandextraKnownMarketplaceskeys. Claude does not install a repo’s marketplace plugins in a session that nobody answers, so the device does it. At each spawn, it fetches every approved marketplace the repo enables, checks out its source, and loads each enabled plugin with--plugin-dir. Only a plugin stored in the marketplace repository itself can load. A private marketplace needs a git credential on the device, or the repo registered in the workspace. If the device cannot fetch the marketplace or find a plugin, the session does not start. The task shows the start refusalmarketplace_stage_failed, with the marketplace and the cause. The repo’s own hooks, helper commands andenvstill refuse. An approval also trusts the hooks inside each approved plugin, because they run with the plugin. A plugin’s own MCP servers stay off. The device must run a current version. An older device still refuses with this reason: update it, then approve. The oldCH_TRUST_HARNESS_MARKETPLACESdevice setting is retired. Its saved lists trust nothing; an admin adopts a captured source per workspace in the same Marketplaces panel. - Trust one repo. Set
CH_TRUST_HARNESS_REPOSon the device to the repo, for examplegithub.com/acme/app. The device then accepts everything that repo commits. Claude also runs the repo’s.mcp.jsonservers and the MCP servers of its plugins. - Trust every repo on the device. Set
CH_TRUST_REPO_HARNESS_CONFIGtotrue. This is the broadest choice. It overrides the two lists. Every repo’s hooks, plugins and MCP servers then run.
All three settings weaken isolation. A trusted repo runs its commands as the user who runs the device server, with no prompt. Trust only repos whose contributors you trust. See Who can run code on your device and Isolating agent runs on a device.
How the lists match
- Write each entry as a comma-separated item. A list holds at most 64 entries.
- A repo entry is a git remote or a
host/owner/repopath. The match is exact and ignores case, the scheme, a user name, a port and a trailing.git. - A wildcard, a bare name such as
app, or an entry with no owner or repo is rejected when you save it. A bad value in the device’s own environment stops the device server at start. - The device matches a marketplace by its source repository, never by its name. A repo that defines a marketplace with the same name but a different source stays refused.
- A plugin must name a marketplace that the repo’s own settings define.
- The device checks only the repo that holds the session’s working folder. Trusting one repo does not trust a second repo that the same task attached.
- A session that starts in a parent folder has no repo to match. Only the marketplace list or the whole-device setting admits it. See Start from a parent folder of repos.
Apply and undo a change
Set the value in the device’s Settings section in the web app, or as an environment variable on the device. See Changing a device’s settings.
A new value takes effect after an operator restarts the device. The device never restarts itself. After a restart that applies a changed value, the 24-hour skip ends for that device and the task tries it again. To end the skip without a change, run:
ch device clear-provision-breaker <device>
To undo trust on a device, remove the entry or clear the setting, then restart the device. The next session is scanned again. A session that already runs keeps what it loaded.
Revoke a marketplace approval
To undo an approved plugin marketplace, choose Revoke on the approval and confirm. The approval is on the Claude card under Admin → Integrations. Or run:
ch marketplace-approval list --state approved
ch marketplace-approval revoke <marketplaceApprovalId> --reason "source retired"
Only a human owner or admin can revoke. Sessions that already run keep running. The next stage that needs the source stops and asks for approval again. You can approve a revoked approval later. The approval card shows who decided and when, with the full history.
Related guides
- Changing a device’s settings — where to set these values
- Who can run code on your device — what a trusted repo can do
- Isolating agent runs on a device — limit what an agent reaches
- When a task is not moving — find the cause of a stuck task
- Skills — the skills that CodeHerder delivers to a session
Last updated