Heat the oven to 425°F. Line a large rimmed sheet pan with parchment. Toss the green beans with 1 tbsp olive oil, 1/4 tsp salt and a pinch of pepper, spread in a single layer and roast for 7 minutes.
Meanwhile, pat the cod dry and season both sides with the remaining 1/4 tsp salt and the black pepper.
Whisk the remaining 2 tbsp olive oil with the garlic, lemon zest, 1 tbsp lemon juice, dill and red pepper flakes.
Pull the pan out, push the beans to the edges, place the cod in the center, spoon the lemon-dill mixture over each fillet and top with a lemon slice.
Roast 12 to 14 minutes, until the cod flakes easily with a fork (145°F) and the beans are tender-crisp.
Spoon the pan juices over the fish and serve hot.