Preheat oven to 450 degrees. Line rimmed baking sheet with aluminum foil. Spread beans and onions on baking sheet. Drizzle with olive oil. Coat evenly. Sprinkle with 1/2 teaspoon of salt, toss to coat and distribute in an even layer. Roast for 10 minutes.
While roasting, combine balsamic vinegar, honey, thyme and garlic slices in a small bowl.
After beans and onions have roasted for 10 minutes, remove from oven. Drizzle vinegar and honey mixture over beans and onions. Put back in the oven and continue to roast until onions and beans are dark golden brown in spots and beans have started to shrivel, about 12 to 15 minutes longer. Adjust seasoning with salt and pepper. Transfer to a serving bowl. Sprinkle with toasted chopped walnuts.