Task-sensitive Adaptability for Software Agents