async def test_clarification_with_suggested_action(self, mock_create_model, debug_tool):
        """Test clarification request with suggested next action"""
        clarification_json = json.dumps(
            {
                "status": "requires_clarification",
                "question": "I need to see the database configuration to diagnose the connection error",
                "files_needed": ["config/database.yml", "src/db.py"],
                "suggested_next_action": {
                    "tool": "debug",
                    "args": {
                        "error_description": "Connection timeout to database",
                        "files": [
                            "/config/database.yml",
                            "/src/db.py",
                            "/logs/error.log",
                        ],
                    },
                },
            }
        )

        mock_model = Mock()
        mock_model.generate_content.return_value = Mock(
            candidates=[Mock(content=Mock(parts=[Mock(text=clarification_json)]))]
        )
        mock_create_model.return_value = mock_model

        result = await debug_tool.execute(
            {
                "error_description": "Connection timeout to database",
                "files": ["/absolute/logs/error.log"],
            }
        )

        assert len(result) == 1

        response_data = json.loads(result[0].text)
        assert response_data["status"] == "requires_clarification"

        clarification = json.loads(response_data["content"])
        assert "suggested_next_action" in clarification
        assert clarification["suggested_next_action"]["tool"] == "debug"
Test clarification request with suggested next action
tests/test_collaboration.py