Cook onions with oil in a medium saucepan over medium-low heat, stirring occasionally, until deep golden, 45 to 60 minutes. Let cool completely.
Meanwhile, hard-cook eggs in another saucepan for 10 minutes and continue with rest of recipe. Drain eggs, rinse under cool water, peel, and quarter.
Fill a third saucepan two-thirds full with water and bring to a boil over high heat. Add green beans and fresh peas, if using, and cook until barely tender, about 3 minutes; if using frozen peas, add during the last minute. Drain vegetables and rinse under cold water until cool.
Whirl nuts in a food processor until ground. Add eggs, green beans, peas, and garlic and pulse until mixture is smooth. Add onions (including any oil and juices from cooking), 3/4 teaspoon salt, and 1/2 teaspoon pepper and pulse just until onions are chopped. Season to taste with more salt and pepper if you like. Serve at room temperature, with matzo crackers.
Yield: Serves 12 (makes 2 1/2 cups)