A 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.
When 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."
Saved records of agents to resume now remember the model and whether the agent was in a worktree.
An agent brought back after a restart can no longer slip past rules you set for agents in worktrees.