Music publishers have reached a partial agreement with Anthropic that requires the Amazon-backed artificial intelligence company to implement “guardrails” around its use of copyrighted song lyrics to train its flagship product, Claude.