Rinse and soak beans overnight; drain. Bring 4 cups of water and beans to boil. Cook for 30-45 minutes.
Bring water and toasted orzo to a boil; cook for 6 to 8 minutes.
In a saucepan, heat the oil over moderately low heat. Add the onion, celery, carrot, garlic, salt and pepper, and cook, stirring occasionally, for 5 minutes. Stir in the tomatoes, stock, thyme and basil and bring to a boil. Adjust the heat so that the mixture simmers gently, cover, and cook for 15 minutes.
Bring the soup back to a boil over moderately high heat, add the toasted orzo and beans, and cook until heated through. Stir in the basil. Makes 6 1½-cup servings.