Under the hood
Background agent status now stores an explicit agent-type field, defaulting to 'bg' if none is given
What
When Claude Code saves the state of a background agent, the stored template value is now explicitly derived from the agent's agentType, falling back to the literal string "bg" if none is provided, rather than passing through whatever value the caller happened to supply.
Why
This ensures background agent records always have a consistent, well-defined type value instead of possibly storing something unexpected or missing from the caller.