Heat the olive oil in a large lidded heavy bottomed saucepan or Dutch oven. Add the garlic and cook over low heat until golden brown on all sides, about 5 minutes. Remove and discard.
Carefully add the peppers, salt, and pepper flakes, if using. Sauté over medium heat until the vegetables are very soft but not browning, about 10 minutes. Stir in the tomatoes and potatoes. Cover with the stock or water and bring to a boil.
Turn the heat down to medium-low and simmer, stirring occasionally, until the potatoes are tender and the broth has thickened, about 15 minutes.
Season the cod with salt, nestle it into the tomato mixture, and cover with a lid. Simmer until the fish is tender but not falling apart, about 7 minutes.
Garnish with the parsley and serve immediately.