Saute the onions until nicely browned. Sprinkle with flour and stir.
Slowly add the red wine and beef stock while stirring constantly.
Stir in the tomato paste and grate in the garlic.
Add sugar, salt, pepper and thyme. Stir well.
Once the sauce gets thicker, add green beans. Cook the green beans in the sauce until they reach desired "crunchiness." (Yes, that is the word I want to use!)