Bug fix in ctxt_agent.py when retrying recipes