def test_finalize_config_multiple_agents_cli_runtime():
    """
    Test that finalize_config correctly disables jupyter and browsing for multiple agents
    when runtime is 'cli'.
    """
    app_config = OpenHandsConfig()
    app_config.runtime = 'cli'

    agent_config1 = AgentConfig(enable_jupyter=True, enable_browsing=True)
    agent_config2 = AgentConfig(enable_jupyter=True, enable_browsing=True)
    app_config.agents['Agent1'] = agent_config1
    app_config.agents['Agent2'] = agent_config2

    finalize_config(app_config)

    assert not app_config.agents['Agent1'].enable_jupyter, (
        'Jupyter should be disabled for Agent1'
    )
    assert not app_config.agents['Agent1'].enable_browsing, (
        'Browsing should be disabled for Agent1'
    )
    assert not app_config.agents['Agent2'].enable_jupyter, (
        'Jupyter should be disabled for Agent2'
    )
    assert not app_config.agents['Agent2'].enable_browsing, (
        'Browsing should be disabled for Agent2'
    )

    Test that finalize_config correctly disables jupyter and browsing for multiple agents
    when runtime is 'cli'.
    
tests/unit/core/config/test_config_utils.py