{"version":"2.1.337","anchor":"resumed-background-agents-keep-model-and-worktree-restrictio","canonical_anchor":"resumed-background-agents-keep-model-and-worktree-restrictio","heading":"Resumed background agents are checked against worktree permission rules","tier":"notice","area":"Agents","scope":"both","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.337\/e\/resumed-background-agents-keep-model-and-worktree-restrictio","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.337","markdown":"### Resumed background agents are checked against worktree permission rules\n\nA background agent resumed after a restart is now blocked if your permission rules forbid agents running in a worktree\n\n**What**\n\nA background agent is a helper that carries on with a task by itself while you keep working. A worktree is a separate working copy of your project folder that git can create, so an agent can make changes away from your main copy.\n\nWhen Claude Code resumes a background agent, it checks the agent against your current permission rules. That check now also covers which model the agent uses and whether it was started in a worktree. If the agent was started in a worktree and your rules now block that, or require approval for it, Claude Code stops with this message: \"This session's permission rules now block an agent in a worktree, or require approval for one.\"\n\nSaved records of agents to resume now remember the model and whether the agent was in a worktree.\n\n**Why**\n\nAn agent brought back after a restart can no longer slip past rules you set for agents in worktrees.\n\n- Area: Agents\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 3\/5\n- Scope: both\n- Heads-up: yes"}