The %[ck7]% is likely an internal token or placeholder from the bedrock agent's output formatting e.g, for clicks. tracking or UI rendering. Potential workaround for fixing this might be stripping it with re.sub().