As suggested by recent empirical evidence, one of the causes behind the widespread rise of inequality experienced by OECD countries in the last few decades may have been the increased flexibility of labor markets. The authors explore this hypothesis through the analysis of a stock-flow consistent agent-based macroeconomic model able to reproduce with good statistical precision several empirical regularities. To this scope they employ three different sensitivity analysis techniques, which indicate that increasing job contract duration (i.e. decreasing flexibility) has the effect of reducing income and wealth inequality. However, the authors also find that this effect is diminished by tight monetary policy and low credit supply. This result suggests that the final outcome of structural reforms aimed at changing labor flexibility can depend on the macroeconomic environment in which these are implemented.