1. Cook onions with oil in a medium saucepan over medium-low heat, stirring occasionally, until deep golden, 45 to 60 minutes. Let cool completely.
2. 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.
3. 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.
4. 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 tsp. salt, and 1/2 tsp. 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.